jackwener commented on code in PR #15714:
URL: https://github.com/apache/doris/pull/15714#discussion_r1065466727


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinLogicalJoinTranspose.java:
##########
@@ -97,13 +104,17 @@ public Rule build() {
                          *  /    \                         /      \
                          * A      B                       B        C
                          */
-                        LogicalJoin<GroupPlan, GroupPlan> newBottomSemiJoin = 
new LogicalJoin<>(
-                                topSemiJoin.getJoinType(),
-                                topSemiJoin.getHashJoinConjuncts(), 
topSemiJoin.getOtherJoinConjuncts(),
-                                JoinHint.NONE,
-                                b, c);
-                        return new LogicalJoin<>(bottomJoin.getJoinType(), 
bottomJoin.getHashJoinConjuncts(),
-                                bottomJoin.getOtherJoinConjuncts(), 
JoinHint.NONE, a, newBottomSemiJoin);
+                        if (bottomJoinType.isInnerJoin() || 
bottomJoinType.isLeftOuterJoin()) {

Review Comment:
   Add them into `typeCheck()` and put it into `when()`



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java:
##########
@@ -200,4 +196,35 @@ public Rule build() {
                     return PlanUtils.project(new 
ArrayList<>(topJoin.getOutput()), newTopJoin).get();
                 }).toRule(RuleType.LOGICAL_OUTER_JOIN_LASSCOM_PROJECT);
     }
+
+    private Map<Boolean, List<Expression>> 
splitConjunctsWithAlias(List<Expression> topConjuncts,

Review Comment:
   rename it.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/SemiJoinLogicalJoinTransposeProject.java:
##########
@@ -109,15 +116,20 @@ public Rule build() {
                          *   /    \                               /      \
                          *  A      B                             B       C
                          */
-                        LogicalJoin<GroupPlan, GroupPlan> newBottomSemiJoin = 
new LogicalJoin<>(
-                                topSemiJoin.getJoinType(), 
topSemiJoin.getHashJoinConjuncts(),
-                                topSemiJoin.getOtherJoinConjuncts(), 
JoinHint.NONE, b, c);
-
-                        LogicalJoin<Plan, Plan> newTopJoin = new 
LogicalJoin<>(bottomJoin.getJoinType(),
-                                bottomJoin.getHashJoinConjuncts(), 
bottomJoin.getOtherJoinConjuncts(), JoinHint.NONE,
-                                a, newBottomSemiJoin);
-
-                        return new LogicalProject<>(new 
ArrayList<>(topSemiJoin.getOutput()), newTopJoin);
+                        if (bottomJoinType.isInnerJoin() || 
bottomJoinType.isLeftOuterJoin()) {

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to