-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Open
Labels
:Analytics/Compute EngineAnalytics in ES|QLAnalytics in ES|QL>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
Description
For a query like...
STATS c = count(*) WHERE a > 1,
m = max(field) WHERE a > 1
BY some_field
(Note: the BY
will prevent the filter to be extracted outside the STATS, once #115678 is merged.)
...we're evaluating the same WHERE a > 1
twice - instead of evaluating it per agg, we should reuse its evaluation. This impacts the actual aggregation execution, to reuse the mask/input block across aggregations.
Ideally, we'd also be able to fuse masks, in case the second agg would look smth like m = max(field) WHERE a > 1 AND other_field > 0
.
Related #114352
Metadata
Metadata
Assignees
Labels
:Analytics/Compute EngineAnalytics in ES|QLAnalytics in ES|QL>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)