This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 90efc2e031589bd8942ec3bbd5d2587dd28f3d28
Author: mch_ucchi <41606806+sohardforan...@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 25a6a60a6b..597c23eec1 100644
--- a/fe/fe-core/src/main/jflex/sql_scanner.flex
+++ b/fe/fe-core/src/main/jflex/sql_scanner.flex
@@ -525,6 +525,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-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to