dutyu commented on PR #21865:
URL: https://github.com/apache/doris/pull/21865#issuecomment-1642041529

   > > > we already support to set `enable_fallback_to_original_planner` in 
hint. So, what the root problem of this PR want to fix?
   > > 
   > > 
   > > The conditional check of 
`enable_fallback_to_original_planner`(`handleQuery()` method at 
`fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java`) is before 
the invoke of `analyzeVariablesInStmt`, so maybe the hint of 
`enable_fallback_to_original_planner` does not works fine now ?
   > 
   > not right. enable_fallback_to_original_planner check is in 
StmtExecutor#executeByNereids, so it could be work fine
   > 
   > the only problem is execut multi statements with one or more statement 
Nereids not support. i think just remove below code block in 
ConnectProcessor.java is ok
   > 
   > ```java
   >             if (parsedStmt instanceof SelectStmt && nereidsParseException 
!= null
   >                     && ctx.getSessionVariable().isEnableNereidsPlanner()
   >                     && 
!ctx.getSessionVariable().enableFallbackToOriginalPlanner) {
   >                 Exception exception = new Exception(
   >                         String.format("Nereids cannot parse the SQL, and 
fallback disabled. caused by: \n\n%s",
   >                                 nereidsParseException.getMessage()), 
nereidsParseException);
   >                 // audit it and break
   >                 handleQueryException(exception, auditStmt, null, null);
   >                 break;
   >             }
   > ```
   
   Got it, thanks for your explanation~


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