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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/pre/EliminateLogicalSelectHint.java:
##########
@@ -57,6 +57,17 @@ public LogicalPlan visitLogicalSelectHint(
     }
 
     private void setVar(SelectHint selectHint, StatementContext context) {
+        // if sv set enable_nereids_planner=true and hint set 
enable_nereids_planner=false, we should set
+        // enable_fallback_to_original_planner=true and revert it after 
executing.
+        boolean isNereidsPlannerDisabled = false;
+        if (selectHint.getParameters().containsKey("enable_nereids_planner")) {

Review Comment:
   key should use SessionVariable.ENABLE_NEREIDS_PLANNER



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/pre/EliminateLogicalSelectHint.java:
##########
@@ -72,5 +72,19 @@ private void setVar(SelectHint selectHint, StatementContext 
context) {
                 }
             }
         }
+        // if sv set enable_nereids_planner=true and hint set 
enable_nereids_planner=false, we should set
+        // enable_fallback_to_original_planner=true and revert it after 
executing.
+        // throw exception to fall back to original planner
+        if (!sessionVariable.isEnableNereidsPlanner()) {
+            String key = "enable_fallback_to_original_planner";

Review Comment:
   we should use 
`org.apache.doris.qe.SessionVariable#ENABLE_FALLBACK_TO_ORIGINAL_PLANNER`



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