Skip to content
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

Autocast Keyword to Date in Date Nanos comparisons #118476

Closed
Tracked by #109352
not-napoleon opened this issue Dec 11, 2024 · 1 comment · Fixed by #118697
Closed
Tracked by #109352

Autocast Keyword to Date in Date Nanos comparisons #118476

not-napoleon opened this issue Dec 11, 2024 · 1 comment · Fixed by #118697
Assignees
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@not-napoleon
Copy link
Member

#116281 added support for comparing nanosecond dates and millisecond dates, but it didn't extend the keyword to date auto-promotion logic to that case. We would like that to work, so that expressions like nanos > "2023-01-01" are valid ES|QL.

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Dec 11, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@not-napoleon not-napoleon self-assigned this Dec 12, 2024
not-napoleon added a commit to not-napoleon/elasticsearch that referenced this issue Dec 17, 2024
resolves elastic#118476

This adds an implicit cast from string to date nanos, much the same as we do for millisecond dates. In the course of working on this, I found and fixed a couple of tests that were creating pre-epoch date nanos, which are not supported in elasticsearch. I also refactored the conversion code to use the standard DateUtils functions where appropriate, which caught some of the above errors in test data.
elasticsearchmachine pushed a commit that referenced this issue Dec 17, 2024
resolves #118476

This adds an implicit cast from string to date nanos, much the same as we do for millisecond dates. In the course of working on this, I found and fixed a couple of tests that were creating pre-epoch date nanos, which are not supported in elasticsearch. I also refactored the conversion code to use the standard DateUtils functions where appropriate, which caught some of the above errors in test data.
rjernst pushed a commit to rjernst/elasticsearch that referenced this issue Dec 18, 2024
resolves elastic#118476

This adds an implicit cast from string to date nanos, much the same as we do for millisecond dates. In the course of working on this, I found and fixed a couple of tests that were creating pre-epoch date nanos, which are not supported in elasticsearch. I also refactored the conversion code to use the standard DateUtils functions where appropriate, which caught some of the above errors in test data.
navarone-feekery pushed a commit to navarone-feekery/elasticsearch that referenced this issue Dec 26, 2024
resolves elastic#118476

This adds an implicit cast from string to date nanos, much the same as we do for millisecond dates. In the course of working on this, I found and fixed a couple of tests that were creating pre-epoch date nanos, which are not supported in elasticsearch. I also refactored the conversion code to use the standard DateUtils functions where appropriate, which caught some of the above errors in test data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants