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

Fix to #19883 - Query: null semantics should keep track of columns that are guaranteed to be null and remove redundant IS NULL/ IS NOT NULL checks #25951

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Sep 9, 2021

Adding a list of columns guaranteed to be null in the given subtree. When processing right side of the || operator, we can convert those to non-nullable columns and therefore improve the generated sql.

Fixes #19883
Fixes #19410

@maumar maumar force-pushed the fix19883 branch 3 times, most recently from e84e5c2 to a35e23f Compare September 11, 2021 21:27
@maumar
Copy link
Contributor Author

maumar commented Sep 14, 2021

@smitpatel ping

@@ -476,6 +484,9 @@ protected virtual SqlExpression VisitCase(CaseExpression caseExpression, bool al
nullable |= elseResultNullable;
}

RestoreNonNullableColumnsList(currentNonNullableColumnsCount);
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch

…at are guaranteed to be null and remove redundant IS NULL/ IS NOT NULL checks

Adding a list of columns guaranteed to be null in the given subtree. When processing right side of the || operator, we can convert those to non-nullable columns and therefore improve the generated sql.

Fixes #19883
Fixes #19410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants