-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Query: improve null conditional simplification #16050
Comments
related to #18555 |
note that some Sqlite functions don't propagate nullability (e.g. all spatial functions returning bool) |
@maumar - This is actually not possible to do easily.
May be best place to do so would be post translation in SQL where we can may be remove Case test if it is null check if the result is somehow null propagating. The cost may not worth the value it would provide. (User can always write without null check and cast result to nullable type) |
In NullCheckRemovingExpressionVisitor we have logic to simplify expressions like:
into simple property access when on relational (null propagation is automatic)
However for some complex cases we miss the optimization and produce overly complicated.
e.g.:
produces:
rather than expected:
The text was updated successfully, but these errors were encountered: