Skip to content

Commit 03a53d3

Browse files
authored
fix(flink): #415 fix supporting json function's different type (#416)
Co-authored-by: zhaoge <>
1 parent 7324c27 commit 03a53d3

File tree

8 files changed

+4956
-4837
lines changed

8 files changed

+4956
-4837
lines changed

src/grammar/flink/FlinkSqlLexer.g4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ KW_INTERVAL : 'INTERVAL';
211211
KW_INTO : 'INTO';
212212
KW_IS : 'IS';
213213
KW_JOIN : 'JOIN';
214+
KW_JSON : 'JSON';
214215
KW_JSON_ARRAY : 'JSON_ARRAY';
215216
KW_JSON_ARRAYAGG : 'JSON_ARRAYAGG';
216217
KW_JSON_EXECUTION_PLAN : 'JSON_EXECUTION_PLAN';

src/grammar/flink/FlinkSqlParser.g4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ predicate
726726
| KW_IS KW_NOT? kind=(KW_TRUE | KW_FALSE | KW_UNKNOWN | KW_NULL)
727727
| KW_IS KW_NOT? kind=KW_DISTINCT KW_FROM right=valueExpression
728728
| KW_NOT? kind=KW_SIMILAR KW_TO right=valueExpression (KW_ESCAPE stringLiteral)?
729+
| KW_IS KW_JSON (KW_VALUE | KW_ARRAY | identifier)?
729730
;
730731

731732
likePredicate
@@ -1179,6 +1180,13 @@ reservedKeywordsUsedAsFuncName
11791180
| KW_VAR_SAMP
11801181
| KW_WEEK
11811182
| KW_YEAR
1183+
| KW_JSON_VALUE
1184+
| KW_JSON_EXISTS
1185+
| KW_JSON_QUERY
1186+
| KW_JSON_OBJECT
1187+
| KW_JSON_OBJECTAGG
1188+
| KW_JSON_ARRAY
1189+
| KW_JSON_ARRAYAGG
11821190
;
11831191

11841192
nonReservedKeywords

src/lib/flink/FlinkSqlLexer.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

src/lib/flink/FlinkSqlLexer.ts

Lines changed: 2379 additions & 2375 deletions
Large diffs are not rendered by default.

src/lib/flink/FlinkSqlParser.interp

Lines changed: 3 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)