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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit a5ee1b3c87186ce13da2ec4488297a5e63f17188
Author: Mingyu Chen <[email protected]>
AuthorDate: Thu Feb 22 17:41:56 2024 +0800

    [fix](keyword) add BELONG as reserve keyword (#31230)
    
    This #27994 introduce a new keyword BELONG, need to add it as reserve 
keyword
---
 fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4  | 1 +
 fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 | 1 +
 fe/fe-core/src/main/cup/sql_parser.cup                             | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4 
b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
index 8f3991084c7..7897232a953 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4
@@ -118,6 +118,7 @@ BACKEND: 'BACKEND';
 BACKENDS: 'BACKENDS';
 BACKUP: 'BACKUP';
 BEGIN: 'BEGIN';
+BELONG: 'BELONG';
 BETWEEN: 'BETWEEN';
 BIGINT: 'BIGINT';
 BIN: 'BIN';
diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 
b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
index 0def8c10ab3..a10f204b0fc 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
@@ -919,6 +919,7 @@ nonReserved
     | BACKENDS
     | BACKUP
     | BEGIN
+    | BELONG
     | BIN
     | BITAND
     | BITMAP
diff --git a/fe/fe-core/src/main/cup/sql_parser.cup 
b/fe/fe-core/src/main/cup/sql_parser.cup
index 798960387cd..5ad7fa07756 100644
--- a/fe/fe-core/src/main/cup/sql_parser.cup
+++ b/fe/fe-core/src/main/cup/sql_parser.cup
@@ -276,7 +276,6 @@ terminal String
     KW_BINLOG,
     KW_BITMAP,
     KW_BITMAP_UNION,
-    KW_NGRAM_BF,
     KW_BLOB,
     KW_BOOLEAN,
     KW_BRIEF,
@@ -495,6 +494,7 @@ terminal String
     KW_NEGATIVE,
     KW_NEVER,
     KW_NEXT,
+    KW_NGRAM_BF,
     KW_NO,
     KW_NOT,
     KW_NULL,
@@ -8086,6 +8086,8 @@ keyword ::=
     {: RESULT = id; :}
     | KW_UNSET:id
     {: RESULT = id; :}
+    | KW_BELONG:id
+    {: RESULT = id; :}
     ;
 
 // Identifier that contain keyword


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to