Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,7 @@ && allowedForDocValues(fieldAttribute, ctx.searchStats(), agg, foundAttributes))
}
}
if (changedAggregates) {
exec = new AggregateExec(
agg.source(),
agg.child(),
agg.groupings(),
orderedAggregates,
agg.getMode(),
agg.intermediateAttributes(),
agg.estimatedRowSize()
);
exec = agg.withAggregates(orderedAggregates);
}
}
if (exec instanceof EvalExec evalExec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public List<? extends NamedExpression> aggregates() {
return aggregates;
}

public AggregateExec withAggregates(List<? extends NamedExpression> newAggregates) {
return new AggregateExec(source(), child(), groupings, newAggregates, mode, intermediateAttributes, estimatedRowSize);
}

public AggregateExec withMode(AggregatorMode newMode) {
return new AggregateExec(source(), child(), groupings, aggregates, newMode, intermediateAttributes, estimatedRowSize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ public TimeSeriesAggregateExec replaceChild(PhysicalPlan newChild) {
);
}

@Override
public AggregateExec withAggregates(List<? extends NamedExpression> newAggregates) {
return new TimeSeriesAggregateExec(
source(),
child(),
groupings(),
newAggregates,
getMode(),
intermediateAttributes(),
estimatedRowSize(),
timeBucket
);
}

@Override
public TimeSeriesAggregateExec withMode(AggregatorMode newMode) {
return new TimeSeriesAggregateExec(
source(),
Expand Down