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

opt: set udf CalledOnNullInput correctly for scalar UDFs #98874

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

DrewKimball
Copy link
Collaborator

Previously, the UDFPrivate.CalledOnNullInput field would be set to true for scalar UDFs, since strict behavior is handled using a CASE statement. However, this is confusing and it is also correct to just set CalledOnNullInput to the value implied by the function's definition.

Informs CRDB-20535

Release note: None

@DrewKimball DrewKimball requested a review from a team as a code owner March 17, 2023 17:55
@blathers-crl
Copy link

blathers-crl bot commented Mar 17, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@DrewKimball DrewKimball requested a review from a team as a code owner March 17, 2023 18:07
@DrewKimball DrewKimball removed the request for review from a team March 17, 2023 18:07
Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

Thanks for clearing this up! :lgtm:

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

Copy link
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

:lgtm: Thank you!

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @DrewKimball)

Previously, the `UDFPrivate.CalledOnNullInput` field would be set to true
for scalar UDFs, since strict behavior is handled using a CASE statement.
However, this is confusing and it is also correct to just set
`CalledOnNullInput` to the value implied by the function's definition.
This patch also adds some detail to the `CalledOnNullInput` comments to
indicate when it is used.

Informs CRDB-20535

Release note: None
@DrewKimball
Copy link
Collaborator Author

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 20, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 20, 2023

Build succeeded:

@craig craig bot merged commit 3427f11 into cockroachdb:master Mar 20, 2023
@DrewKimball DrewKimball deleted the strict-udf-clarity branch March 24, 2023 17:50
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.

4 participants