-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Fix missing fields in range aggregation response for date fields #82732
Fix missing fields in range aggregation response for date fields #82732
Conversation
When running a range aggregation on a date field both `fromAsStr` and `toAsStr` need to be parsed to extract the correct range boundaries. Not doing so results in +/- infinite values in `to`, `from`, `originalTo` and `originalFrom` which in turn result in: * incorrect key values (wildcard character used for infinite values); * missing fields in the response (to, from, to_as_string, from_as_string) due to checks for initite values in the serialization logic;
This needs to be back-ported to |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
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.
LGTM
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.
LGTM. Thanks for the quick turn around.
…astic#82732) When running a range aggregation on a date field both `fromAsStr` and `toAsStr` need to be parsed to extract the correct range boundaries. Not doing so results in +/- infinite values in `to`, `from`, `originalTo` and `originalFrom` which in turn result in: * incorrect key values (wildcard character used for infinite values); * missing fields in the response (to, from, to_as_string, from_as_string) due to checks for initite values in the serialization logic;
💔 Backport failed
You can use sqren/backport to manually backport by running |
…astic#82732) When running a range aggregation on a date field both `fromAsStr` and `toAsStr` need to be parsed to extract the correct range boundaries. Not doing so results in +/- infinite values in `to`, `from`, `originalTo` and `originalFrom` which in turn result in: * incorrect key values (wildcard character used for infinite values); * missing fields in the response (to, from, to_as_string, from_as_string) due to checks for initite values in the serialization logic; (cherry picked from commit 1186e90) # Conflicts: # rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/40_range.yml
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lds (#82732) (#82757) When running a range aggregation on a date field both `fromAsStr` and `toAsStr` need to be parsed to extract the correct range boundaries. Not doing so results in +/- infinite values in `to`, `from`, `originalTo` and `originalFrom` which in turn result in: * incorrect key values (wildcard character used for infinite values); * missing fields in the response (to, from, to_as_string, from_as_string) due to checks for initite values in the serialization logic; (cherry picked from commit 1186e90)
…ds (#82732) (#82755) When running a range aggregation on a date field both `fromAsStr` and `toAsStr` need to be parsed to extract the correct range boundaries. Not doing so results in +/- infinite values in `to`, `from`, `originalTo` and `originalFrom` which in turn result in: * incorrect key values (wildcard character used for infinite values); * missing fields in the response (to, from, to_as_string, from_as_string) due to checks for initite values in the serialization logic; * Update yaml test skip version after back-port from 8.1.0
This is a fix for #82688
When running a range aggregation on a date field both
fromAsStr
andtoAsStr
need to be parsed to extract the correct range boundaries.Not doing so results in +/- infinite values in
to
,from
,originalTo
and
originalFrom
which in turn result in:due to checks for infinite values in the serialisation logic;
Here we make sure we use the correct from/to values by eventually using
either numeric ranges or parsing string ranges.