Skip to content
Draft
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 @@ -94,8 +94,7 @@ public PushDownAggContext(List<AggregateFunction> aggFunctions,
* @return true, if groupKeys is not empty and no group by key is in aggFunctionsInputSlots
*/
public boolean isValid() {
return !groupKeys.isEmpty()
&& !groupKeys.stream().anyMatch(s -> aggFunctionsInputSlots.contains(s));
return !groupKeys.isEmpty();
}

public PushDownAggContext passThroughBigJoin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ public Plan visitLogicalAggregate(LogicalAggregate<? extends Plan> agg, JobConte
If body = (If) (aggFunction).child(0);
Set<Slot> valueSlots = Sets.newHashSet(body.getTrueValue().getInputSlots());
valueSlots.addAll(body.getFalseValue().getInputSlots());
if (body.getCondition().getInputSlots().stream().anyMatch(s -> valueSlots.contains(s))) {
// do not push down sum(if a then a else b)
return agg;
}
// if (body.getCondition().getInputSlots().stream().anyMatch(s -> valueSlots.contains(s))) {
// // do not push down sum(if a then a else b)
// return agg;
// }
AggregateFunction aggTrue = (AggregateFunction) aggFunction.withChildren(body.getTrueValue());
aggFunctions.add(aggTrue);
funcs.add(aggTrue);
Expand Down
Loading