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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/OuterJoinLAsscomProject.java:
##########
@@ -89,20 +87,36 @@ public Rule build() {
                     Set<ExprId> bExprIdSet = 
InnerJoinLAsscomProject.getExprIdSetForB(bottomJoin.right(),
                             newRightProjects);
 
-                    /* ********** split HashConjuncts ********** */
-                    Map<Boolean, List<Expression>> splitOn = 
InnerJoinLAsscomProject.splitHashConjunctsWithAlias(
-                            topJoin.getHashJoinConjuncts(), bottomJoin, 
bExprIdSet);
-                    List<Expression> newTopHashJoinConjuncts = 
splitOn.get(true);
+                    /* ********** split Conjuncts ********** */
+                    Map<Boolean, List<Expression>> splitHashJoinConjuncts
+                            = InnerJoinLAsscomProject.splitConjunctsWithAlias(
+                            topJoin.getHashJoinConjuncts(), bottomJoin, 
bottomJoin.getHashJoinConjuncts(), bExprIdSet);
+                    List<Expression> newTopHashJoinConjuncts = 
splitHashJoinConjuncts.get(true);
+                    
Preconditions.checkState(!newTopHashJoinConjuncts.isEmpty(),
+                            "LAsscom newTopHashJoinConjuncts join can't 
empty");
+                    // When newTopHashJoinConjuncts.size() != 
bottomJoin.getHashJoinConjuncts().size()
+                    // It means that topHashJoinConjuncts contain A, B, C, we 
should LAsscom.
                     if (topJoin.getJoinType() != bottomJoin.getJoinType()
                             && newTopHashJoinConjuncts.size() != 
bottomJoin.getHashJoinConjuncts().size()) {
                         return null;
                     }
-                    List<Expression> newBottomHashJoinConjuncts = 
splitOn.get(false);
+                    List<Expression> newBottomHashJoinConjuncts = 
splitHashJoinConjuncts.get(false);
                     if (newBottomHashJoinConjuncts.size() == 0) {
                         return null;
                     }
 
-                    /* ********** replace HashConjuncts by projects ********** 
*/
+                    Map<Boolean, List<Expression>> splitOtherJoinConjuncts
+                            = InnerJoinLAsscomProject.splitConjunctsWithAlias(

Review Comment:
   This function is not universal (it is obvious in the parameters).
   
   



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to