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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/ReorderJoin.java:
##########
@@ -90,6 +91,11 @@ public Plan joinToMultiJoin(Plan plan) {
             return plan;
         }
 
+        // Can't reorder the join inputs if this join has hints.
+        if (plan instanceof LogicalJoin && ((LogicalJoin) plan).hasJoinHint()) 
{
+            return plan;
+        }
+

Review Comment:
   could we still eliminate all cross join if we add this?



##########
fe/fe-core/src/test/java/org/apache/doris/nereids/util/ExceptionChecker.java:
##########
@@ -37,6 +37,7 @@ public ExceptionChecker assertMessageEquals(String message) {
     }
 
     public ExceptionChecker assertMessageContains(String context) {
+        System.out.println(exception.getMessage());
         Assertions.assertTrue(exception.getMessage().contains(context));

Review Comment:
   Assertions.assertTrue(exception.getMessage().contains(context), 
exception.getMessage());



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -122,7 +122,13 @@ relation
     ;
 
 joinRelation
-    : (joinType) JOIN right=relationPrimary joinCriteria?
+     : (joinType) JOIN joinHint? right=relationPrimary joinCriteria?
+     ;

Review Comment:
   ```suggestion
       : (joinType) JOIN joinHint? right=relationPrimary joinCriteria?
       ;
   ```



-- 
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