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 #16078 - Query/Null semantics: when checking if expression is null, just check it's constituents rather than entire expression #18560

Merged
merged 1 commit into from
Oct 24, 2019

Commits on Oct 24, 2019

  1. Fix to #16078 - Query/Null semantics: when checking if expression is …

    …null, just check it's constituents rather than entire expression
    
    Problem was that during null semantics rewrite we create IS NULL calls on the operands of the comparison. If the operands themselves are complicated, we were simply comparing the entire complex expression to null. In some cases, we only need to look at constituents, e.g. a + b == null <=> a == null || b == null.
    
    Also added other minor optimizations around null semantics:
    
    - non_nullable_column IS NULL resolves to false,
    - try to simplify expression after applying de Morgan transformations
    
    Also fixed a bug exposed by these changes, where column nullability would be incorrect for scenarios with owned types.
    maumar committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    07c0940 View commit details
    Browse the repository at this point in the history