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

[SMALL] Fix to #26357 - [Q] SqlNullabilityProcessor.VisitSqlFunction, Nullability of SUM function #26401

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Oct 18, 2021

Small optimization, Nullability processor was already doing the right thing during expand null semantics step (since it was evaluating nullability of the COALESCE(sum, 0) which is never null), but now we are bit more efficient. We mark the SUM function as non nullable earlier so we never need to compute its nullability during the later step.

Fixes #26357

@maumar maumar requested a review from smitpatel October 18, 2021 21:47
…lity of SUM function

Marking SUM as non-nullable always. For the most part we were already doing the right thing during expand null semantics step (since it was evaluating nullability of the COALESCE(sum, 0) which is never null), but now we are bit more efficient.
Also, we can now apply some additional optimizations on SUM that required it to be non-nullable (e.g. pushing NOT operator inside)

Fixes #26357
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.

[Q] SqlNullabilityProcessor.VisitSqlFunction, Nullability of SUM function
2 participants