Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sem/builtins: fix population of generator builtins #95447

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

yuzefovich
Copy link
Member

Generator builtins are such that they should not evaluated as scalars (i.e. Fn and FnWithExprs evaluation functions should not be called on them). In order to highlight this as an assertion failure we initialize generator builtins with special functions in those two fields. However, previously the initialization was broken since we were modifying a copy of the builtin struct, and this is now fixed. There isn't much of a production impact though (if we ever tried to evaluate the generator as a scalar, it'd result in a nil pointer which would be caught by the vectorized engine panic-catcher; also, it seems very hard if possible to trigger this without the testing randomizations), so there is no release note.

Informs: #94890.
Epic: None

Release note: None

Generator builtins are such that they should not evaluated as scalars
(i.e. `Fn` and `FnWithExprs` evaluation functions should not be called
on them). In order to highlight this as an assertion failure we
initialize generator builtins with special functions in those two
fields. However, previously the initialization was broken since we were
modifying a copy of the builtin struct, and this is now fixed. There
isn't much of a production impact though (if we ever tried to evaluate
the generator as a scalar, it'd result in a nil pointer which would be
caught by the vectorized engine panic-catcher; also, it seems very hard
if possible to trigger this without the testing randomizations), so
there is no release note.

Release note: None
@yuzefovich yuzefovich requested review from cucaroach and a team January 18, 2023 17:37
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Thanks for helping out with #94890!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 18, 2023

Build succeeded:

@craig craig bot merged commit 1d2ba22 into cockroachdb:master Jan 18, 2023
@yuzefovich yuzefovich deleted the fix-generator-overload branch January 18, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants