We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As pointed out by @xudong963 on #1376, there are several other rewrite rules we could add following the pattern in simplify:
A AND !(A) --> false (if A is not nullable)
Note that if A is null (or some expresson that could be null), then A AND !(A) is NULL
A
A AND !(A)
Similarly,
A * 0 --> 0 (if A is not nullable)
The "is nullable" bit is somewhat tricky -- and to be honest I am not sure our current code handles all such cases correctly either.
The text was updated successfully, but these errors were encountered:
simplify
Simplifer
Is already implemented:
https://github.com/apache/arrow-datafusion/blob/b58ec81ab06af7a267ee69b834715727dbef963d/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs#L580-L591
Implemented by #4200
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
As pointed out by @xudong963 on #1376, there are several other rewrite rules we could add following the pattern in simplify:
Note that if
A
is null (or some expresson that could be null), thenA AND !(A)
is NULLSimilarly,
The "is nullable" bit is somewhat tricky -- and to be honest I am not sure our current code handles all such cases correctly either.
The text was updated successfully, but these errors were encountered: