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 2022/12/09 06:42:34 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #13601: [Feature](Nereids) Support join hint.

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