[ESQL] Fix Binary Comparisons on Date Nanos#116346
Merged
not-napoleon merged 2 commits intoelastic:mainfrom Nov 7, 2024
Merged
[ESQL] Fix Binary Comparisons on Date Nanos#116346not-napoleon merged 2 commits intoelastic:mainfrom
not-napoleon merged 2 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Collaborator
|
Hi @not-napoleon, I've created a changelog YAML for you. |
5 tasks
bpintea
approved these changes
Nov 7, 2024
| required_capability: to_date_nanos | ||
| required_capability: date_nanos_binary_comparison | ||
|
|
||
| FROM date_nanos | WHERE MV_MIN(nanos) > TO_DATE_NANOS("2023-10-23T12:27:28.948000000Z") | SORT nanos DESC; |
Contributor
There was a problem hiding this comment.
nitty nit -- we can leave the 0s out
Suggested change
| FROM date_nanos | WHERE MV_MIN(nanos) > TO_DATE_NANOS("2023-10-23T12:27:28.948000000Z") | SORT nanos DESC; | |
| FROM date_nanos | WHERE MV_MIN(nanos) > TO_DATE_NANOS("2023-10-23T12:27:28.948Z") | SORT nanos DESC; |
ivancea
approved these changes
Nov 7, 2024
Collaborator
💚 Backport successful
|
not-napoleon
added a commit
to not-napoleon/elasticsearch
that referenced
this pull request
Nov 7, 2024
Relates to elastic#109992 When I implemented binary comparisons for date nanos in elastic#111908 I failed to update the verifyBinaryComparisons rule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notably TO_DATE_NANOS) to write the tests. This PR fixes the issue by adding DATE_NANOS to the list of allowed types for binary comparisons in the verifier.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 7, 2024
Relates to #109992 When I implemented binary comparisons for date nanos in #111908 I failed to update the verifyBinaryComparisons rule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notably TO_DATE_NANOS) to write the tests. This PR fixes the issue by adding DATE_NANOS to the list of allowed types for binary comparisons in the verifier.
kderusso
pushed a commit
to kderusso/elasticsearch
that referenced
this pull request
Nov 7, 2024
Relates to elastic#109992 When I implemented binary comparisons for date nanos in elastic#111908 I failed to update the verifyBinaryComparisons rule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notably TO_DATE_NANOS) to write the tests. This PR fixes the issue by adding DATE_NANOS to the list of allowed types for binary comparisons in the verifier.
jozala
pushed a commit
that referenced
this pull request
Nov 13, 2024
Relates to #109992 When I implemented binary comparisons for date nanos in #111908 I failed to update the verifyBinaryComparisons rule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notably TO_DATE_NANOS) to write the tests. This PR fixes the issue by adding DATE_NANOS to the list of allowed types for binary comparisons in the verifier.
alexey-ivanov-es
pushed a commit
to alexey-ivanov-es/elasticsearch
that referenced
this pull request
Nov 28, 2024
Relates to elastic#109992 When I implemented binary comparisons for date nanos in elastic#111908 I failed to update the verifyBinaryComparisons rule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notably TO_DATE_NANOS) to write the tests. This PR fixes the issue by adding DATE_NANOS to the list of allowed types for binary comparisons in the verifier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #109992
When I implemented binary comparisons for date nanos in #111908 I failed to update the
verifyBinaryComparisonsrule, which implements another layer of type checking for binary comparisons, external to the type logic in the Expression classes. Since the unit tests for the expressions don't run the full query processing stack, this bug was invisible to them. Only full integration tests, such as the CSV tests I've added here, can catch this kind of error. The initial PR did not include these because we didn't have enough supporting functions (notablyTO_DATE_NANOS) to write the tests.This PR fixes the issue by adding
DATE_NANOSto the list of allowed types for binary comparisons in the verifier.