Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
morningman committed Mar 30, 2024
1 parent d109878 commit 971e284
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.doris.mysql.MysqlSerializer;
import org.apache.doris.mysql.MysqlServerStatusFlag;
import org.apache.doris.nereids.exceptions.NotSupportedException;
import org.apache.doris.nereids.exceptions.ParseException;
import org.apache.doris.nereids.glue.LogicalPlanAdapter;
import org.apache.doris.nereids.minidump.MinidumpUtils;
import org.apache.doris.nereids.parser.Dialect;
Expand Down Expand Up @@ -232,11 +233,19 @@ public void executeQuery(MysqlCommand mysqlCommand, String originStmt) throws Ex
// Parse sql failed, audit it and return
handleQueryException(e, convertedStmt, null, null);
return;
} catch (ParseEx)
} catch (ParseException e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Nereids parse sql failed. Reason: {}. Statement: \"{}\".",
e.getMessage(), convertedStmt);
}
// ATTN: Do not set nereidsParseException in this case.
// Because ParseException means the sql is not supported by Nereids.
// It should be parsed by old parser, so not setting nereidsParseException to avoid
// suppressing the exception thrown by old parser.
} catch (Exception e) {
// TODO: We should catch all exception here until we support all query syntax.
if (LOG.isDebugEnabled()) {
LOG.debug("Nereids parse sql failed. Reason: {}. Statement: \"{}\".",
LOG.debug("Nereids parse sql failed with other exception. Reason: {}. Statement: \"{}\".",
e.getMessage(), convertedStmt);
}
nereidsParseException = e;
Expand Down

0 comments on commit 971e284

Please sign in to comment.