Mechanism for foldable aggregations in ES|QL #118292
Labels
:Analytics/ES|QL
AKA ESQL
>enhancement
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
Currently, ES|QL lacks two major performance improvements aspects for aggregations (
stats
):PropagateEvalFoldables
optimization rule.null
handling in aggregation functions so that aggregations onnull
constant do not reach the compute engine and is already computed locally. There are multiple already created issues about this.A first attempt at addressing this introduced too many workarounds to be considered valuable and merge-worthy:
SubstituteSurrogates
twice. TheSubstituteSurrogates
rule should be called only once, its role shouldn't be a partial mechanism for dealing with constants in aggregate functions, as it happens now.SubstituteSurrogates
be called twice introduced yet another issue and broke existent working behaviorAs a consequence, aggregations must support a specific mechanism in which they can provide a result given they receive constants as arguments, probably in the form of an interface. This should also come with support in the LogicalPlanOptimizer in the form of a new rule + changes to existent rules that deal with folding, null folding and constants propagation.
The text was updated successfully, but these errors were encountered: