File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change 33
33
import org .elasticsearch .xpack .esql .expression .function .aggregate .Count ;
34
34
import org .elasticsearch .xpack .esql .expression .function .grouping .Categorize ;
35
35
import org .elasticsearch .xpack .esql .plan .physical .AggregateExec ;
36
- import org .elasticsearch .xpack .esql .plan .physical .ExchangeSourceExec ;
37
36
import org .elasticsearch .xpack .esql .plan .physical .TimeSeriesAggregateExec ;
38
37
import org .elasticsearch .xpack .esql .planner .LocalExecutionPlanner .LocalExecutionPlannerContext ;
39
38
import org .elasticsearch .xpack .esql .planner .LocalExecutionPlanner .PhysicalOperation ;
@@ -71,14 +70,6 @@ public final PhysicalOperation groupingPhysicalOperation(
71
70
72
71
var sourceLayout = source .layout ;
73
72
74
- if (aggregatorMode != AggregatorMode .INITIAL && aggregatorMode != AggregatorMode .FINAL ) {
75
- assert false : "Invalid aggregator mode [" + aggregatorMode + "]" ;
76
- }
77
- if (aggregatorMode == AggregatorMode .INITIAL && aggregateExec .child () instanceof ExchangeSourceExec ) {
78
- // the reducer step at data node (local) level
79
- aggregatorMode = AggregatorMode .INTERMEDIATE ;
80
- }
81
-
82
73
if (aggregateExec .groupings ().isEmpty ()) {
83
74
// not grouping
84
75
List <Aggregator .Factory > aggregatorFactories = new ArrayList <>();
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ public static PhysicalPlan reductionPlan(PhysicalPlan plan) {
124
124
final LocalMapper mapper = new LocalMapper ();
125
125
PhysicalPlan reducePlan = mapper .map (pipelineBreaker );
126
126
if (reducePlan instanceof AggregateExec agg ) {
127
- reducePlan = agg .withMode (AggregatorMode .INITIAL ); // force to emit intermediate outputs
127
+ reducePlan = agg .withMode (AggregatorMode .INTERMEDIATE );
128
128
}
129
129
return EstimatesRowSize .estimateRowSize (fragment .estimatedRowSize (), reducePlan );
130
130
}
You can’t perform that action at this time.
0 commit comments