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
ESQL: Simplify IS NULL/IS NOT NULL evaluation #103097
Labels
Milestone
Comments
elasticsearchmachine
added
the
Team:QL (Deprecated)
Meta label for query languages team
label
Dec 7, 2023
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
costin
added a commit
to costin/elasticsearch
that referenced
this issue
Dec 7, 2023
The IS NULL, IS NOT NULL predicates only care about the nullability not the value of an expression. Given the expression x + 1 / 2, the actual result does not matter only if it's null or not - that is, it only matters if x is null or not. So x + 1 / 2 IS NULL becomes x IS NULL - which can be opportunistically pushed down or evaluated. Fix elastic#103097
costin
added a commit
to costin/elasticsearch
that referenced
this issue
Dec 7, 2023
The IS NULL, IS NOT NULL predicates only care about the nullability not the value of an expression. Given the expression x + 1 / 2, the actual result does not matter only if it's null or not - that is, it only matters if x is null or not. So x + 1 / 2 IS NULL becomes x IS NULL - which can be opportunistically pushed down or evaluated. Fix elastic#103097
costin
added a commit
to costin/elasticsearch
that referenced
this issue
Dec 7, 2023
The IS NULL, IS NOT NULL predicates only care about the nullability not the value of an expression. Given the expression x + 1 / 2, the actual result does not matter only if it's null or not - that is, it only matters if x is null or not. So x + 1 / 2 IS NULL becomes x IS NULL - which can be opportunistically pushed down or evaluated. Fix elastic#103097
Should we account for overflows as well? |
We should, see #103099 |
costin
added a commit
that referenced
this issue
Dec 13, 2023
The IS NULL, IS NOT NULL predicates only care about the nullability not the value of an expression. Given the expression x + 1 / 2, the actual result does not matter only if it's null or not - that is, it only matters if x is null or not. So x + 1 / 2 IS NULL becomes x IS NULL - which can be opportunistically pushed down or evaluated. Preserve the original expression to cope with under/overflow or mv fields Fix #103097
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
The IS NULL/IS NOT NULL only care about the nullability not the value of an expression.
Given the expression x + 1 / 2, the actual result does not matter only if it's null or not - that is, it only matters if x is null or not.
So x + 1 / 2 IS NULL becomes x IS NULL - which can be opportunistically pushed down or evaluated.
The text was updated successfully, but these errors were encountered: