Skip to content

Commit

Permalink
[chore](Nereids): remove SemiJoinCommute in rewriter (apache#28563)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener authored Dec 18, 2023
1 parent 9cf9d56 commit ddcfba0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.apache.doris.nereids.rules.analysis.ResolveOrdinalInOrderByAndGroupBy;
import org.apache.doris.nereids.rules.analysis.SubqueryToApply;
import org.apache.doris.nereids.rules.analysis.UserAuthentication;
import org.apache.doris.nereids.rules.rewrite.JoinCommute;
import org.apache.doris.nereids.rules.rewrite.SemiJoinCommute;

import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -124,7 +124,7 @@ private static List<RewriteJob> buildAnalyzeJobs(Optional<CustomTableResolver> c
bottomUp(new CheckAnalysis()),
topDown(new EliminateGroupByConstant()),
topDown(new NormalizeAggregate()),
bottomUp(new JoinCommute()),
bottomUp(new SemiJoinCommute()),
bottomUp(
new CollectSubQueryAlias(),
new CollectJoinConstraint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.apache.doris.nereids.rules.rewrite.InferJoinNotNull;
import org.apache.doris.nereids.rules.rewrite.InferPredicates;
import org.apache.doris.nereids.rules.rewrite.InferSetOperatorDistinct;
import org.apache.doris.nereids.rules.rewrite.JoinCommute;
import org.apache.doris.nereids.rules.rewrite.LimitSortToTopN;
import org.apache.doris.nereids.rules.rewrite.MergeFilters;
import org.apache.doris.nereids.rules.rewrite.MergeOneRowRelationIntoUnion;
Expand Down Expand Up @@ -229,7 +228,6 @@ public class Rewriter extends AbstractBatchJobExecutor {
),
// push down SEMI Join
bottomUp(
new JoinCommute(),
new TransposeSemiJoinLogicalJoin(),
new TransposeSemiJoinLogicalJoinProject(),
new TransposeSemiJoinAgg(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* RightAntiJoin -> LeftAntiJoin
* RightOuterJoin -> LeftOuterJoin
*/
public class JoinCommute extends OneRewriteRuleFactory {
public class SemiJoinCommute extends OneRewriteRuleFactory {
@Override
public Rule build() {
return logicalJoin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public void testRightSemiJoin() {
.filter(new EqualTo(scan3.getOutput().get(0), scan1.getOutput().get(0)))
.build();
PlanChecker.from(MemoTestUtils.createConnectContext(), plan2)
.applyBottomUp(new SemiJoinCommute())
.rewrite()
.matchesFromRoot(
logicalProject(
Expand Down

0 comments on commit ddcfba0

Please sign in to comment.