You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/10 08:30:14 UTC

[GitHub] [doris] jackwener commented on a diff in pull request #15714: [fix](nereids)fix some nereids bugs

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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org