-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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] Basic casting for Date Nanos #111850
Merged
elasticsearchmachine
merged 9 commits into
elastic:main
from
not-napoleon:esql-date-nanos-casting
Aug 14, 2024
Merged
[ESQL] Basic casting for Date Nanos #111850
elasticsearchmachine
merged 9 commits into
elastic:main
from
not-napoleon:esql-date-nanos-casting
Aug 14, 2024
Conversation
This file contains 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
elasticsearchmachine
added
the
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
label
Aug 13, 2024
Pinging @elastic/es-analytical-engine (Team:Analytics) |
nik9000
approved these changes
Aug 14, 2024
@@ -230,7 +232,7 @@ public static Iterable<Object[]> parameters() { | |||
return parameterSuppliersFromTypedDataWithDefaultChecks( | |||
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" |
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.
Should I look into making sure these don't leak date_nanos
when the feature flag is disabled?
not-napoleon
added
the
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
label
Aug 14, 2024
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).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Analytics/ES|QL
AKA ESQL
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
>non-issue
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v8.16.0
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
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 toUNSUPPORTED
when the flag is disabled.