Skip to content

Commit a90c502

Browse files
author
zhaoge
committed
fix(flink): fix flinksql syntax error about ROW and function using
1 parent 64ed7e4 commit a90c502

File tree

6 files changed

+1384
-1240
lines changed

6 files changed

+1384
-1240
lines changed

src/grammar/flink/FlinkSqlParser.g4

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ mapTypeDimension
240240
;
241241

242242
rowTypeDimension
243-
: LESS_SYMBOL columnName columnType (COMMA columnName columnType)* GREATER_SYMBOL
243+
: (LR_BRACKET | LESS_SYMBOL) columnName columnType (COMMA columnName columnType)* (
244+
RR_BRACKET
245+
| GREATER_SYMBOL
246+
)
244247
;
245248

246249
columnConstraint
@@ -647,7 +650,7 @@ limitClause
647650
;
648651

649652
partitionByClause
650-
: KW_PARTITION KW_BY columnName (COMMA columnName)*
653+
: KW_PARTITION KW_BY (columnName | primaryExpression) (COMMA (columnName | primaryExpression))*
651654
;
652655

653656
quantifiers
@@ -1216,4 +1219,4 @@ nonReservedKeywords
12161219
| KW_WEEK
12171220
| KW_YEARS
12181221
| KW_ZONE
1219-
;
1222+
;

src/lib/flink/FlinkSqlParser.interp

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

0 commit comments

Comments
 (0)