-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Unexpected behaviour for min - max aggregations on date_nanos type #52220
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
I was just looking at these fields this morning so I'll have a look at this too. |
Drive-by comment: could be related to the BKD optimization in the min/max aggregators, because that is disabled if there is a query (among other things) which might explain the different behavior |
You are dead on. I believe I've fixed it. Now just got to make a test! |
Fixes the the no-query optimization for `min` and `max` aggregations for `date_nanos` fields by delegating decoding dates "through" their `resolution` member. Closes elastic#52220
Fixes the the no-query optimization for `min` and `max` aggregations for `date_nanos` fields by delegating decoding dates "through" their `resolution` member. Closes #52220
Fixes the the no-query optimization for `min` and `max` aggregations for `date_nanos` fields by delegating decoding dates "through" their `resolution` member. Closes elastic#52220
Fixes the the no-query optimization for `min` and `max` aggregations for `date_nanos` fields by delegating decoding dates "through" their `resolution` member. Closes elastic#52220
Describe the feature:
Elasticsearch version (
bin/elasticsearch --version
): 7.6.0-SNAPSHOTbuild_hash : "6653ed095a2fa342c9f58ddefd03dd47fb72b5d7",
build_date : "2020-02-11T02:35:28.882468Z",
Plugins installed: [
repository-gcs-7.6.0-SNAPSHOT.zip
]JVM version (
java -version
): openjdk version "12.0.2"OS version (
uname -a
if on a Unix-like system): 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64Description of the problem including expected versus actual behavior:
Computing the min and max aggregations on a
date_nanos
field produce an unexpected"value_as_string"
string representation value.If a query range is added to manually specify the upper limit, the problem does not arise.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
this produces the following output:
We get the right values:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: