morrySnow commented on code in PR #12890:
URL: https://github.com/apache/doris/pull/12890#discussion_r983213345


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscom.java:
##########
@@ -40,19 +52,72 @@ public class InnerJoinLAsscom extends 
OneExplorationRuleFactory {
     @Override
     public Rule build() {
         return innerLogicalJoin(innerLogicalJoin(), group())
-                .when(topJoin -> check(topJoin, topJoin.left()))
+                .when(topJoin -> checkReorder(topJoin, topJoin.left()))
                 .then(topJoin -> {
-                    JoinLAsscomHelper helper = new JoinLAsscomHelper(topJoin, 
topJoin.left());
-                    if (!helper.initJoinOnCondition()) {
+                    LogicalJoin<GroupPlan, GroupPlan> bottomJoin = 
topJoin.left();
+                    
Preconditions.checkState(!topJoin.getOtherJoinCondition().isPresent());
+                    
Preconditions.checkState(!bottomJoin.getOtherJoinCondition().isPresent());

Review Comment:
   use when to avoid this situation and add a TODO



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/InnerJoinLAsscomProject.java:
##########
@@ -39,14 +62,141 @@ public class InnerJoinLAsscomProject extends 
OneExplorationRuleFactory {
     @Override
     public Rule build() {
         return innerLogicalJoin(logicalProject(innerLogicalJoin()), group())
-                .when(topJoin -> InnerJoinLAsscom.check(topJoin, 
topJoin.left().child()))
+                .when(topJoin -> InnerJoinLAsscom.checkReorder(topJoin, 
topJoin.left().child()))
                 .then(topJoin -> {
-                    JoinLAsscomHelper helper = new JoinLAsscomHelper(topJoin, 
topJoin.left().child());
-                    helper.initProject(topJoin.left());
-                    if (!helper.initJoinOnCondition()) {
+
+                    /* ********** init ********** */
+                    List<NamedExpression> projects = 
topJoin.left().getProjects();
+                    LogicalJoin<GroupPlan, GroupPlan> bottomJoin = 
topJoin.left().child();
+                    
Preconditions.checkState(!topJoin.getOtherJoinCondition().isPresent());

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