seawinde commented on code in PR #27231:
URL: https://github.com/apache/doris/pull/27231#discussion_r1403398816


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/NereidsParser.java:
##########
@@ -59,45 +58,45 @@ public class NereidsParser {
      * see <a 
href="https://dev.mysql.com/doc/internals/en/com-set-option.html";>docs</a> for 
more information.
      */
     public List<StatementBase> parseSQL(String originStr) {
-        List<Pair<LogicalPlan, StatementContext>> logicalPlans = 
parseMultiple(originStr);
-        List<StatementBase> statementBases = Lists.newArrayList();
-        for (Pair<LogicalPlan, StatementContext> parsedPlanToContext : 
logicalPlans) {
-            statementBases.add(new 
LogicalPlanAdapter(parsedPlanToContext.first, parsedPlanToContext.second));
-        }
-        return statementBases;
+        return parseSQL(originStr, (LogicalPlanBuilder) null);
     }
 
     /**
      * ParseSQL with dialect.
      */
     public List<StatementBase> parseSQL(String sql, SessionVariable 
sessionVariable) {
-        if (ParseDialect.TRINO_395.getDialect().getDialectName()
-                .equalsIgnoreCase(sessionVariable.getSqlDialect())) {
-            return parseSQLWithDialect(sql, sessionVariable);
-        } else {
-            return parseSQL(sql);
+        ParseDialect.Dialect sqlDialect = 
ParseDialect.Dialect.getByName(sessionVariable.getSqlDialect());
+        if (sqlDialect != null) {

Review Comment:
   sqlDialect seems never is null, can not reach the below code `parseSQL(sql)`



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