-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: Allow the data type of null
in filters
#118324
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: Allow the data type of null
in filters
#118324
Conversation
I think I should write another test where the result is empty when where |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Thank you for contributing to Elasticsearch. You may add more complicated queries in some of the And you may also add more complicated queries to LogicalPlanOptimizerTests to validate the query plans sent from coordinator node to the data nodes are as expected. As this change affects the behavior of the targeting queries on different Elasticsearch versions, backward compatibility should also be taken into account. |
Thank you for your detailed guidance @fang-xing-esql ! I have added some tests, but I am not sure if they meet the requirements. Please let me know if any changes are needed. |
Thank you for adding more tests @kanoshiou! We have a couple of more suggestions and then this PR is in a good shape.
|
Thank you for your guidance and support on the PR, @fang-xing-esql! If my test cases have any omissions, please let me know. I'm happy to add them. 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kanoshiou! I left a small comment, the rest looks good.
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
Outdated
Show resolved
Hide resolved
Thank you for reviewing, @fang-xing-esql ! I've updated the branch according to your comment. |
buildkite test this |
Hi @fang-xing-esql , I tried the command in buildkite to reproduce the failure on my local machine, but no exception was thrown. This is quite puzzling. |
buildkite test this |
buildkite test this |
I believe the failed tests are unrelated to my code changes, @fang-xing-esql . I’ve merged the latest code into my branch. The first failed test case has been muted by #119510, and I have tested the remaining two failed tests; they passed successfully. Hope the tests pass this time. 🤞 |
buildkite test this |
buildkite test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution to elasticsearch @kanoshiou! Looks good to me.
Thank you for approving this PR @fang-xing-esql! Just a gentle reminder in case you forget to click the merge button. |
* Allow the data type of `null` in filters
* ESQL: Allow the data type of `null` in filters (#118324) * Allow the data type of `null` in filters * ESQL: Fix `NULL` handling in `IN` clause (#125832) This PR fixes #119950 where an `IN` query includes `NULL` values with non-NULL `DataType` appearing within the query range. An expression is considered `NULL` when its `DataType` is `NULL` or it is a `Literal` with a value of `null`. * Revert formatting --------- Co-authored-by: kanoshiou <[email protected]>
Allow filter null in ESQL.
Closes #116351