starocean999 commented on code in PR #49987:
URL: https://github.com/apache/doris/pull/49987#discussion_r2041760815


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -3729,10 +3742,17 @@ private LogicalPlan withSelectHint(LogicalPlan 
logicalPlan, List<ParserRuleConte
                         break;
                     case "leading":
                         List<String> leadingParameters = new ArrayList<>();
+                        int distributeIndex = 1;
                         for (HintAssignmentContext kv : 
hintStatement.parameters) {
                             if (kv.key != null) {
-                                String parameterName = 
visitIdentifierOrText(kv.key);
+                                String parameterName = 
visitIdentifierOrTextOrParen(kv.key);
                                 leadingParameters.add(parameterName);
+                            } else if (kv.distributeHintType() != null) {
+                                if (kv.distributeHintType().BROADCAST() != 
null) {
+                                    leadingParameters.add("[broadcast]_" + 
distributeIndex++);
+                                } else {
+                                    leadingParameters.add("[shuffle]_" + 
distributeIndex++);

Review Comment:
   use LeadingHint.shuffleString



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