[ESQL] Basic casting for Date Nanos#111850
Merged
elasticsearchmachine merged 9 commits intoelastic:mainfrom Aug 14, 2024
Merged
[ESQL] Basic casting for Date Nanos#111850elasticsearchmachine merged 9 commits intoelastic:mainfrom
elasticsearchmachine merged 9 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
nik9000
approved these changes
Aug 14, 2024
| true, | ||
| suppliers, | ||
| (v, p) -> "boolean or counter_integer or counter_long or datetime or numeric or string" | ||
| (v, p) -> "boolean or counter_integer or counter_long or date_nanos or datetime or numeric or string" |
Member
There was a problem hiding this comment.
Should I look into making sure these don't leak date_nanos when the feature flag is disabled?
not-napoleon
added a commit
that referenced
this pull request
Aug 15, 2024
resolves #109992 Nothing fancy here. Nanosecond dates are still longs, and we can just compare them as longs. Please note that, as mentioned in the linked issue, this only supports comparing date nanos to other date nanos, and not comparing to millisecond dates. With the cast functions added in #111850, users can explicitly cast to millisecond dates (or longs) to compare nanos to other things.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 19, 2024
These are generated files, resulting from [this PR](#111850).
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 4, 2024
Resolves elastic#109990 For the most part, this should be straightforward. The only "decision" being made here is to truncate when casting to millisecond dates, which is what we do in the `DateUtils` library class, and seems like a sensible choice. Nothing in here needs to be controlled via the feature flag, as we already just set the type to `UNSUPPORTED` when the flag is disabled.
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 4, 2024
resolves elastic#109992 Nothing fancy here. Nanosecond dates are still longs, and we can just compare them as longs. Please note that, as mentioned in the linked issue, this only supports comparing date nanos to other date nanos, and not comparing to millisecond dates. With the cast functions added in elastic#111850, users can explicitly cast to millisecond dates (or longs) to compare nanos to other things.
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 4, 2024
…111961) These are generated files, resulting from [this PR](elastic#111850).
davidkyle
pushed a commit
to davidkyle/elasticsearch
that referenced
this pull request
Sep 5, 2024
Resolves elastic#109990 For the most part, this should be straightforward. The only "decision" being made here is to truncate when casting to millisecond dates, which is what we do in the `DateUtils` library class, and seems like a sensible choice. Nothing in here needs to be controlled via the feature flag, as we already just set the type to `UNSUPPORTED` when the flag is disabled.
davidkyle
pushed a commit
to davidkyle/elasticsearch
that referenced
this pull request
Sep 5, 2024
resolves elastic#109992 Nothing fancy here. Nanosecond dates are still longs, and we can just compare them as longs. Please note that, as mentioned in the linked issue, this only supports comparing date nanos to other date nanos, and not comparing to millisecond dates. With the cast functions added in elastic#111850, users can explicitly cast to millisecond dates (or longs) to compare nanos to other things.
davidkyle
pushed a commit
to davidkyle/elasticsearch
that referenced
this pull request
Sep 5, 2024
…111961) These are generated files, resulting from [this PR](elastic#111850).
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.
Resolves #109990
For the most part, this should be straightforward. The only "decision" being made here is to truncate when casting to millisecond dates, which is what we do in the
DateUtilslibrary class, and seems like a sensible choice. Nothing in here needs to be controlled via the feature flag, as we already just set the type toUNSUPPORTEDwhen the flag is disabled.