-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[ES|QL] Fix aggregate_metric_double sorting and mv_expand issues #131658
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
base: main
Are you sure you want to change the base?
[ES|QL] Fix aggregate_metric_double sorting and mv_expand issues #131658
Conversation
This commit fixes a bug when sorting on multiple indices, where one index contains an aggregate_metric_double field, but at least one other index does not contain that field. The root cause being that the aggregate_metric_double field, when not present in a doc, will be encoded as a NullBlock (1 value), but later on decoded as an AggregateMetricDouble block (which expects to decode 4 values, even if they're all null). It also adds an implementation for MV_EXPAND so it just returns the existing block instead of erroring out, as multi-values are not supported for AggregateMetricDoubleBlock.
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @limotova, I've created a changelog YAML for you. |
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
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.
Can you add unit tests for AGGREGATE_METRIC_DOUBLE
in ExtractorTests? But the production changes look good. Thanks Larisa!
This commit fixes a bug when sorting on multiple indices, where one index contains an aggregate_metric_double field, but at least one other index does not contain that field.
The root issue being that the aggregate_metric_double field, when not present in a doc, will be encoded as a NullBlock (1 value), but later on decoded as an AggregateMetricDouble block (which expects to decode 4 values, even if they're all null).
It also adds an implementation for MV_EXPAND so it just returns the existing block instead of erroring out, as multi-values are not supported for AggregateMetricDoubleBlock.