Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@
import org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderTopN;
import org.apache.doris.nereids.rules.rewrite.PushCountIntoUnionAll;
import org.apache.doris.nereids.rules.rewrite.PushDownAggThroughJoinOnPkFk;
import org.apache.doris.nereids.rules.rewrite.PushDownAggThroughJoinOneSide;
import org.apache.doris.nereids.rules.rewrite.PushDownAggWithDistinctThroughJoinOneSide;
import org.apache.doris.nereids.rules.rewrite.PushDownDistinctThroughJoin;
import org.apache.doris.nereids.rules.rewrite.PushDownEncodeSlot;
import org.apache.doris.nereids.rules.rewrite.PushDownFilterIntoSchemaScan;
import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughProject;
Expand Down Expand Up @@ -677,16 +675,12 @@ public class Rewriter extends AbstractBatchJobExecutor {
topDown(new PushDownAggThroughJoinOnPkFk()),
topDown(new PullUpJoinFromUnionAll())
),
topic("init join", bottomUp(ImmutableList.of(new InitJoinOrder()))),
topic("Eager aggregation",
cascadesContext -> cascadesContext.rewritePlanContainsTypes(
LogicalAggregate.class, LogicalJoin.class
),
costBased(topDown(
new PushDownAggWithDistinctThroughJoinOneSide(),
new PushDownAggThroughJoinOneSide()
)),

costBased(custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN, PushDownDistinctThroughJoin::new)),
costBased(topDown(new PushDownAggWithDistinctThroughJoinOneSide())),
custom(RuleType.PUSH_DOWN_AGG_THROUGH_JOIN, PushDownAggregation::new),
topDown(new PushCountIntoUnionAll())
),
Expand Down Expand Up @@ -754,7 +748,6 @@ public class Rewriter extends AbstractBatchJobExecutor {
new MergeProjectable())
),
topic("set initial join order",
bottomUp(ImmutableList.of(new InitJoinOrder())),
bottomUp(ImmutableList.of(new PushDownJoinOnAssertNumRows(), new MergeProjectable())),
topDown(new SkewJoin())),
topic("agg rewrite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ private static boolean checkBlackList(RuleType ruleType) {
List<RuleType> ruleWhiteList = new ArrayList<>(Arrays.asList(
RuleType.PUSH_DOWN_AGG_THROUGH_JOIN,
RuleType.PUSH_DOWN_AGG_THROUGH_JOIN_ONE_SIDE,
RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN));
RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN,
RuleType.PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE));
if (!ruleWhiteList.isEmpty() && ruleWhiteList.contains(ruleType)) {
return true;
}
Expand Down

This file was deleted.

Loading
Loading