You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/26 11:20:02 UTC
[doris] branch master updated: [Fix](Planner) fix throw NPE when parse error (#19097)
This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4a6e65c172 [Fix](Planner) fix throw NPE when parse error (#19097)
4a6e65c172 is described below
commit 4a6e65c172c1eee65be3d9f534b3f8816a22c44a
Author: mch_ucchi <41...@users.noreply.github.com>
AuthorDate: Wed Apr 26 19:19:55 2023 +0800
[Fix](Planner) fix throw NPE when parse error (#19097)
some syntax error will cause unclear msg: NPE,because symbol.value is null and cause NPE when call toLowerCase(), we fix it by check if the value is null and return early.
---
fe/fe-core/src/main/jflex/sql_scanner.flex | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fe/fe-core/src/main/jflex/sql_scanner.flex b/fe/fe-core/src/main/jflex/sql_scanner.flex
index 62a237e3b3..e00ee2eae7 100644
--- a/fe/fe-core/src/main/jflex/sql_scanner.flex
+++ b/fe/fe-core/src/main/jflex/sql_scanner.flex
@@ -553,6 +553,9 @@ import org.apache.doris.qe.SqlModeHelper;
}
public static boolean isKeyword(String str) {
+ if (str == null) {
+ return false;
+ }
return keywordMap.containsKey(str.toLowerCase());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org