|
22 | 22 | import org.elasticsearch.xpack.esql.expression.function.aggregate.Count; |
23 | 23 | import org.elasticsearch.xpack.esql.optimizer.LocalPhysicalOptimizerContext; |
24 | 24 | import org.elasticsearch.xpack.esql.optimizer.PhysicalOptimizerRules; |
25 | | -import org.elasticsearch.xpack.esql.plan.physical.AggregateExec; |
| 25 | +import org.elasticsearch.xpack.esql.plan.physical.AbstractAggregateExec; |
26 | 26 | import org.elasticsearch.xpack.esql.plan.physical.EsQueryExec; |
27 | 27 | import org.elasticsearch.xpack.esql.plan.physical.EsStatsQueryExec; |
28 | 28 | import org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan; |
|
41 | 41 | /** |
42 | 42 | * Looks for the case where certain stats exist right before the query and thus can be pushed down. |
43 | 43 | */ |
44 | | -public class PushStatsToSource extends PhysicalOptimizerRules.ParameterizedOptimizerRule<AggregateExec, LocalPhysicalOptimizerContext> { |
| 44 | +public class PushStatsToSource extends PhysicalOptimizerRules.ParameterizedOptimizerRule<AbstractAggregateExec, LocalPhysicalOptimizerContext> { |
45 | 45 |
|
46 | 46 | @Override |
47 | | - protected PhysicalPlan rule(AggregateExec aggregateExec, LocalPhysicalOptimizerContext context) { |
| 47 | + protected PhysicalPlan rule(AbstractAggregateExec aggregateExec, LocalPhysicalOptimizerContext context) { |
48 | 48 | PhysicalPlan plan = aggregateExec; |
49 | 49 | if (aggregateExec.child() instanceof EsQueryExec queryExec) { |
50 | 50 | var tuple = pushableStats(aggregateExec, context); |
@@ -72,7 +72,7 @@ protected PhysicalPlan rule(AggregateExec aggregateExec, LocalPhysicalOptimizerC |
72 | 72 | } |
73 | 73 |
|
74 | 74 | private Tuple<List<Attribute>, List<EsStatsQueryExec.Stat>> pushableStats( |
75 | | - AggregateExec aggregate, |
| 75 | + AbstractAggregateExec aggregate, |
76 | 76 | LocalPhysicalOptimizerContext context |
77 | 77 | ) { |
78 | 78 | AttributeMap.Builder<EsStatsQueryExec.Stat> statsBuilder = AttributeMap.builder(); |
|
0 commit comments