Skip to content

Commit

Permalink
4 phase
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Apr 23, 2024
1 parent 4aee706 commit eaeb84e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public Boolean visitPhysicalHashAggregate(PhysicalHashAggregate<? extends Plan>
&& agg.getOutputExpressions().size() == 1) {
return true;
}
if (agg.getGroupByExpressions().size() > 1
&& agg.getGroupByExpressions().size() == agg.getOutputExpressions().size()) {
return true;
}
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ && couldConvertToMulti(agg))
RuleType.FOUR_PHASE_AGGREGATE_WITH_DISTINCT.build(
basePattern
.when(agg -> agg.getDistinctArguments().size() == 1)
.when(agg -> agg.getGroupByExpressions().isEmpty())
// .when(agg -> agg.getGroupByExpressions().isEmpty())
.thenApplyMulti(ctx -> fourPhaseAggregateWithDistinct(ctx.root, ctx.connectContext))
)
);
Expand Down

0 comments on commit eaeb84e

Please sign in to comment.