feat(flink): update flink SQL grammar

This commit is contained in:
Erindcl 2020-12-03 16:25:43 +08:00
parent 8cfdd0e856
commit 04c4c40397
10 changed files with 5454 additions and 4544 deletions

View File

@ -198,6 +198,7 @@ COMPACT: 'COMPACT';
CONCATENATE: 'CONCATENATE'; CONCATENATE: 'CONCATENATE';
CHANGE: 'CHANGE'; CHANGE: 'CHANGE';
CASCADE: 'CASCADE'; CASCADE: 'CASCADE';
CONSTRAINT: 'CONSTRAINT';
RESTRICT: 'RESTRICT'; RESTRICT: 'RESTRICT';
CLUSTERED: 'CLUSTERED'; CLUSTERED: 'CLUSTERED';
SORTED: 'SORTED'; SORTED: 'SORTED';
@ -261,6 +262,10 @@ CATALOG: 'CATALOG';
LANGUAGE: 'LANGUAGE'; LANGUAGE: 'LANGUAGE';
CATALOGS: 'CATALOGS'; CATALOGS: 'CATALOGS';
VIEWS: 'VIEWS'; VIEWS: 'VIEWS';
PRIMARY: 'PRIMARY';
KEY: 'KEY';
PERIOD: 'PERIOD';
SYSTEM_TIME: 'SYSTEM_TIME';
// DATA TYPE Keywords // DATA TYPE Keywords
@ -288,6 +293,8 @@ BOOLEAN: 'BOOLEAN';
RAW: 'RAW'; RAW: 'RAW';
ROW: 'ROW'; ROW: 'ROW';
NULL: 'NULL'; NULL: 'NULL';
DATETIME: 'DATETIME'; // 数栈自定义类型
// Operators. Comparation // Operators. Comparation
@ -328,7 +335,8 @@ PENCENT_SIGN: '%';
DOUBLE_VERTICAL_SIGN: '||'; DOUBLE_VERTICAL_SIGN: '||';
DOUBLE_HYPNEN_SIGN: '--'; DOUBLE_HYPNEN_SIGN: '--';
SLASH_SIGN: '/'; SLASH_SIGN: '/';
DOT_ID: '.' ID_LITERAL; DOT_ID: '.' ID_LITERAL_FRAG;
PLUS_DOT_ID: (':' | '.') PLUS_ID_LITERAL;
STRING_LITERAL: DQUOTA_STRING | SQUOTA_STRING | BQUOTA_STRING; STRING_LITERAL: DQUOTA_STRING | SQUOTA_STRING | BQUOTA_STRING;
DIG_LITERAL: DEC_DIGIT+; DIG_LITERAL: DEC_DIGIT+;
REAL_LITERAL: (DEC_DIGIT+)? '.' DEC_DIGIT+ REAL_LITERAL: (DEC_DIGIT+)? '.' DEC_DIGIT+
@ -336,10 +344,12 @@ REAL_LITERAL: (DEC_DIGIT+)? '.' DEC_DIGIT+
| (DEC_DIGIT+)? '.' (DEC_DIGIT+ EXPONENT_NUM_PART) | (DEC_DIGIT+)? '.' (DEC_DIGIT+ EXPONENT_NUM_PART)
| DEC_DIGIT+ EXPONENT_NUM_PART; | DEC_DIGIT+ EXPONENT_NUM_PART;
BIT_STRING: BIT_STRING_L; BIT_STRING: BIT_STRING_L;
ID: ID_LITERAL; ID_LITERAL: ID_LITERAL_FRAG;
PLUS_ID_LITERAL: PLUS_ID_LITERAL_FRAG;
fragment EXPONENT_NUM_PART: 'E' [-+]? DEC_DIGIT+; fragment EXPONENT_NUM_PART: 'E' [-+]? DEC_DIGIT+;
fragment ID_LITERAL: [A-Z_0-9a-z]*?[A-Z_a-z]+?[A-Z_0-9a-z]*; fragment ID_LITERAL_FRAG: [A-Z_0-9a-z]*?[A-Z_a-z]+?[A-Z_0-9a-z]*;
fragment PLUS_ID_LITERAL_FRAG: ('a'..'z' | '0'..'9' | '_' | '*' | '@' | '#' | '^' | '$' | '%' | '&')*?[A-Z_a-z]+?('a'..'z' | '0'..'9' | '_' | '*' | '@' | '#' | '^' | '$' | '%' | '&')*;
fragment DEC_DIGIT: [0-9]; fragment DEC_DIGIT: [0-9];
fragment DEC_LETTER: [A-Za-z]; fragment DEC_LETTER: [A-Za-z];
fragment DQUOTA_STRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"'; fragment DQUOTA_STRING: '"' ( '\\'. | '""' | ~('"'| '\\') )* '"';

View File

@ -53,7 +53,9 @@ createTable
: CREATE TABLE uid : CREATE TABLE uid
LR_BRACKET LR_BRACKET
columnOptionDefinition (COMMA columnOptionDefinition)* columnOptionDefinition (COMMA columnOptionDefinition)*
watermarkDefinition? (COMMA watermarkDefinition)?
(COMMA tableConstraint)?
(COMMA selfDefinitionClause)?
RR_BRACKET RR_BRACKET
commentSpec? commentSpec?
partitionDefinition? partitionDefinition?
@ -62,11 +64,15 @@ createTable
; ;
columnOptionDefinition columnOptionDefinition
: columnName columnType lengthOneDimension? : columnName columnType lengthOneDimension? columnAlias?
; ;
columnName columnName
: ID : plusUid | expression
;
columnNameList
: columnName (',' columnName)*
; ;
columnType columnType
@ -74,7 +80,8 @@ columnType
| DECIMAL | TINYINT | SMALLINT | INT | BIGINT | FLOAT | DOUBLE | DECIMAL | TINYINT | SMALLINT | INT | BIGINT | FLOAT | DOUBLE
| DATE | TIME | TIMESTAMP | DATE | TIME | TIMESTAMP
| ARRAY | MAP | MULTISET | ROW | ARRAY | MAP | MULTISET | ROW
| BOOLEAN | RAW | NULL) | BOOLEAN | RAW | NULL
| DATETIME)
; ;
lengthOneDimension lengthOneDimension
@ -89,6 +96,14 @@ watermarkDefinition
: WATERMARK FOR expression AS expression : WATERMARK FOR expression AS expression
; ;
tableConstraint
: (CONSTRAINT identifier)? PRIMARY KEY '(' columnNameList ')'
;
selfDefinitionClause // 数栈自定义语句 PERIOD FOR SYSTEM_TIME
: PERIOD FOR SYSTEM_TIME
;
partitionDefinition partitionDefinition
: PARTITIONED BY transformList : PARTITIONED BY transformList
; ;
@ -126,7 +141,7 @@ createDatabase
; ;
createView createView
: CREATE TEMPORARY? VIEW ifNotExists? uid (columnName (',' columnName)*)? commentSpec? AS queryStatement : CREATE TEMPORARY? VIEW ifNotExists? uid columnNameList? commentSpec? AS queryStatement
; ;
createFunction createFunction
@ -355,7 +370,7 @@ valueExpression
primaryExpression primaryExpression
: CASE whenClause+ (ELSE elseExpression=expression)? END #searchedCase : CASE whenClause+ (ELSE elseExpression=expression)? END #searchedCase
| CASE value=expression whenClause+ (ELSE elseExpression=expression)? END #simpleCase | CASE value=expression whenClause+ (ELSE elseExpression=expression)? END #simpleCase
// | CAST '(' expression AS dataType ')' #cast | CAST '(' expression AS columnType ')' #cast
// | STRUCT '(' (argument+=namedExpression (',' argument+=namedExpression)*)? ')' #struct // | STRUCT '(' (argument+=namedExpression (',' argument+=namedExpression)*)? ')' #struct
| FIRST '(' expression (IGNORE NULLS)? ')' #first | FIRST '(' expression (IGNORE NULLS)? ')' #first
| LAST '(' expression (IGNORE NULLS)? ')' #last | LAST '(' expression (IGNORE NULLS)? ')' #last
@ -393,7 +408,7 @@ dereferenceDefinition
// base common // base common
qualifiedName qualifiedName
: identifier ('.' identifier)* : identifier | dereferenceDefinition
; ;
interval interval
@ -421,6 +436,10 @@ intervalValue
| STRING_LITERAL | STRING_LITERAL
; ;
columnAlias
: AS? strictIdentifier identifierList?
;
tableAlias tableAlias
: AS? strictIdentifier identifierList? : AS? strictIdentifier identifierList?
; ;
@ -452,7 +471,7 @@ strictIdentifier
; ;
unquotedIdentifier unquotedIdentifier
: DIG_LITERAL | ID : DIG_LITERAL | ID_LITERAL
; ;
quotedIdentifier quotedIdentifier
@ -468,7 +487,11 @@ uidList
; ;
uid uid
: ID (DOT_ID)*? : ID_LITERAL DOT_ID*?
;
plusUid // 匹配 xxx.$xx xx:xxxx 等字符
: (ID_LITERAL | PLUS_ID_LITERAL) (DOT_ID | PLUS_DOT_ID)*?
; ;
withOption withOption
@ -490,7 +513,7 @@ tableProperty
; ;
tablePropertyKey tablePropertyKey
: identifier ('.' identifier)* : identifier | dereferenceDefinition
| STRING_LITERAL | STRING_LITERAL
; ;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -187,126 +187,134 @@ COMPACT=186
CONCATENATE=187 CONCATENATE=187
CHANGE=188 CHANGE=188
CASCADE=189 CASCADE=189
RESTRICT=190 CONSTRAINT=190
CLUSTERED=191 RESTRICT=191
SORTED=192 CLUSTERED=192
PURGE=193 SORTED=193
INPUTFORMAT=194 PURGE=194
OUTPUTFORMAT=195 INPUTFORMAT=195
DATABASE=196 OUTPUTFORMAT=196
DATABASES=197 DATABASE=197
DFS=198 DATABASES=198
TRUNCATE=199 DFS=199
ANALYZE=200 TRUNCATE=200
COMPUTE=201 ANALYZE=201
LIST=202 COMPUTE=202
STATISTICS=203 LIST=203
PARTITIONED=204 STATISTICS=204
EXTERNAL=205 PARTITIONED=205
DEFINED=206 EXTERNAL=206
REVOKE=207 DEFINED=207
GRANT=208 REVOKE=208
LOCK=209 GRANT=209
UNLOCK=210 LOCK=210
MSCK=211 UNLOCK=211
REPAIR=212 MSCK=212
RECOVER=213 REPAIR=213
EXPORT=214 RECOVER=214
IMPORT=215 EXPORT=215
LOAD=216 IMPORT=216
ROLE=217 LOAD=217
ROLES=218 ROLE=218
COMPACTIONS=219 ROLES=219
PRINCIPALS=220 COMPACTIONS=220
TRANSACTIONS=221 PRINCIPALS=221
INDEX=222 TRANSACTIONS=222
INDEXES=223 INDEX=223
LOCKS=224 INDEXES=224
OPTION=225 LOCKS=225
ANTI=226 OPTION=226
LOCAL=227 ANTI=227
INPATH=228 LOCAL=228
WATERMARK=229 INPATH=229
UNNEST=230 WATERMARK=230
MATCH_RECOGNIZE=231 UNNEST=231
MEASURES=232 MATCH_RECOGNIZE=232
ONE=233 MEASURES=233
PER=234 ONE=234
MATCH=235 PER=235
SKIP1=236 MATCH=236
NEXT=237 SKIP1=237
PAST=238 NEXT=238
PATTERN=239 PAST=239
WITHIN=240 PATTERN=240
DEFINE=241 WITHIN=241
WS=242 DEFINE=242
SYSTEM=243 WS=243
INCLUDING=244 SYSTEM=244
EXCLUDING=245 INCLUDING=245
CONSTRAINTS=246 EXCLUDING=246
OVERWRITING=247 CONSTRAINTS=247
GENERATED=248 OVERWRITING=248
CATALOG=249 GENERATED=249
LANGUAGE=250 CATALOG=250
CATALOGS=251 LANGUAGE=251
VIEWS=252 CATALOGS=252
STRING=253 VIEWS=253
ARRAY=254 PRIMARY=254
MAP=255 KEY=255
CHAR=256 PERIOD=256
VARCHAR=257 SYSTEM_TIME=257
BINARY=258 STRING=258
VARBINARY=259 ARRAY=259
BYTES=260 MAP=260
DECIMAL=261 CHAR=261
TINYINT=262 VARCHAR=262
SMALLINT=263 BINARY=263
INT=264 VARBINARY=264
BIGINT=265 BYTES=265
FLOAT=266 DECIMAL=266
DOUBLE=267 TINYINT=267
DATE=268 SMALLINT=268
TIME=269 INT=269
TIMESTAMP=270 BIGINT=270
MULTISET=271 FLOAT=271
BOOLEAN=272 DOUBLE=272
RAW=273 DATE=273
ROW=274 TIME=274
NULL=275 TIMESTAMP=275
EQUAL_SYMBOL=276 MULTISET=276
GREATER_SYMBOL=277 BOOLEAN=277
LESS_SYMBOL=278 RAW=278
EXCLAMATION_SYMBOL=279 ROW=279
BIT_NOT_OP=280 NULL=280
BIT_OR_OP=281 DATETIME=281
BIT_AND_OP=282 EQUAL_SYMBOL=282
BIT_XOR_OP=283 GREATER_SYMBOL=283
DOT=284 LESS_SYMBOL=284
LS_BRACKET=285 EXCLAMATION_SYMBOL=285
RS_BRACKET=286 BIT_NOT_OP=286
LR_BRACKET=287 BIT_OR_OP=287
RR_BRACKET=288 BIT_AND_OP=288
COMMA=289 BIT_XOR_OP=289
SEMICOLON=290 DOT=290
AT_SIGN=291 LS_BRACKET=291
SINGLE_QUOTE_SYMB=292 RS_BRACKET=292
DOUBLE_QUOTE_SYMB=293 LR_BRACKET=293
REVERSE_QUOTE_SYMB=294 RR_BRACKET=294
COLON_SYMB=295 COMMA=295
ASTERISK_SIGN=296 SEMICOLON=296
UNDERLINE_SIGN=297 AT_SIGN=297
HYPNEN_SIGN=298 SINGLE_QUOTE_SYMB=298
ADD_SIGN=299 DOUBLE_QUOTE_SYMB=299
PENCENT_SIGN=300 REVERSE_QUOTE_SYMB=300
DOUBLE_VERTICAL_SIGN=301 COLON_SYMB=301
DOUBLE_HYPNEN_SIGN=302 ASTERISK_SIGN=302
SLASH_SIGN=303 UNDERLINE_SIGN=303
DOT_ID=304 HYPNEN_SIGN=304
STRING_LITERAL=305 ADD_SIGN=305
DIG_LITERAL=306 PENCENT_SIGN=306
REAL_LITERAL=307 DOUBLE_VERTICAL_SIGN=307
BIT_STRING=308 DOUBLE_HYPNEN_SIGN=308
ID=309 SLASH_SIGN=309
DOT_ID=310
PLUS_DOT_ID=311
STRING_LITERAL=312
DIG_LITERAL=313
REAL_LITERAL=314
BIT_STRING=315
ID_LITERAL=316
PLUS_ID_LITERAL=317
'SELECT'=4 'SELECT'=4
'FROM'=5 'FROM'=5
'ADD'=6 'ADD'=6
@ -493,117 +501,123 @@ ID=309
'CONCATENATE'=187 'CONCATENATE'=187
'CHANGE'=188 'CHANGE'=188
'CASCADE'=189 'CASCADE'=189
'RESTRICT'=190 'CONSTRAINT'=190
'CLUSTERED'=191 'RESTRICT'=191
'SORTED'=192 'CLUSTERED'=192
'PURGE'=193 'SORTED'=193
'INPUTFORMAT'=194 'PURGE'=194
'OUTPUTFORMAT'=195 'INPUTFORMAT'=195
'DATABASE'=196 'OUTPUTFORMAT'=196
'DATABASES'=197 'DATABASE'=197
'DFS'=198 'DATABASES'=198
'TRUNCATE'=199 'DFS'=199
'ANALYZE'=200 'TRUNCATE'=200
'COMPUTE'=201 'ANALYZE'=201
'LIST'=202 'COMPUTE'=202
'STATISTICS'=203 'LIST'=203
'PARTITIONED'=204 'STATISTICS'=204
'EXTERNAL'=205 'PARTITIONED'=205
'DEFINED'=206 'EXTERNAL'=206
'REVOKE'=207 'DEFINED'=207
'GRANT'=208 'REVOKE'=208
'LOCK'=209 'GRANT'=209
'UNLOCK'=210 'LOCK'=210
'MSCK'=211 'UNLOCK'=211
'REPAIR'=212 'MSCK'=212
'RECOVER'=213 'REPAIR'=213
'EXPORT'=214 'RECOVER'=214
'IMPORT'=215 'EXPORT'=215
'LOAD'=216 'IMPORT'=216
'ROLE'=217 'LOAD'=217
'ROLES'=218 'ROLE'=218
'COMPACTIONS'=219 'ROLES'=219
'PRINCIPALS'=220 'COMPACTIONS'=220
'TRANSACTIONS'=221 'PRINCIPALS'=221
'INDEX'=222 'TRANSACTIONS'=222
'INDEXES'=223 'INDEX'=223
'LOCKS'=224 'INDEXES'=224
'OPTION'=225 'LOCKS'=225
'ANTI'=226 'OPTION'=226
'LOCAL'=227 'ANTI'=227
'INPATH'=228 'LOCAL'=228
'WATERMARK'=229 'INPATH'=229
'UNNEST'=230 'WATERMARK'=230
'MATCH_RECOGNIZE'=231 'UNNEST'=231
'MEASURES'=232 'MATCH_RECOGNIZE'=232
'ONE'=233 'MEASURES'=233
'PER'=234 'ONE'=234
'MATCH'=235 'PER'=235
'SKIP1'=236 'MATCH'=236
'NEXT'=237 'SKIP1'=237
'PAST'=238 'NEXT'=238
'PATTERN'=239 'PAST'=239
'WITHIN'=240 'PATTERN'=240
'DEFINE'=241 'WITHIN'=241
'WS'=242 'DEFINE'=242
'SYSTEM'=243 'WS'=243
'INCLUDING'=244 'SYSTEM'=244
'EXCLUDING'=245 'INCLUDING'=245
'CONSTRAINTS'=246 'EXCLUDING'=246
'OVERWRITING'=247 'CONSTRAINTS'=247
'GENERATED'=248 'OVERWRITING'=248
'CATALOG'=249 'GENERATED'=249
'LANGUAGE'=250 'CATALOG'=250
'CATALOGS'=251 'LANGUAGE'=251
'VIEWS'=252 'CATALOGS'=252
'STRING'=253 'VIEWS'=253
'ARRAY'=254 'PRIMARY'=254
'MAP'=255 'KEY'=255
'CHAR'=256 'PERIOD'=256
'VARCHAR'=257 'SYSTEM_TIME'=257
'BINARY'=258 'STRING'=258
'VARBINARY'=259 'ARRAY'=259
'BYTES'=260 'MAP'=260
'DECIMAL'=261 'CHAR'=261
'TINYINT'=262 'VARCHAR'=262
'SMALLINT'=263 'BINARY'=263
'INT'=264 'VARBINARY'=264
'BIGINT'=265 'BYTES'=265
'FLOAT'=266 'DECIMAL'=266
'DOUBLE'=267 'TINYINT'=267
'DATE'=268 'SMALLINT'=268
'TIME'=269 'INT'=269
'TIMESTAMP'=270 'BIGINT'=270
'MULTISET'=271 'FLOAT'=271
'BOOLEAN'=272 'DOUBLE'=272
'RAW'=273 'DATE'=273
'ROW'=274 'TIME'=274
'NULL'=275 'TIMESTAMP'=275
'='=276 'MULTISET'=276
'>'=277 'BOOLEAN'=277
'<'=278 'RAW'=278
'!'=279 'ROW'=279
'~'=280 'NULL'=280
'|'=281 'DATETIME'=281
'&'=282 '='=282
'^'=283 '>'=283
'.'=284 '<'=284
'['=285 '!'=285
']'=286 '~'=286
'('=287 '|'=287
')'=288 '&'=288
','=289 '^'=289
';'=290 '.'=290
'@'=291 '['=291
'\''=292 ']'=292
'"'=293 '('=293
'`'=294 ')'=294
':'=295 ','=295
'*'=296 ';'=296
'_'=297 '@'=297
'-'=298 '\''=298
'+'=299 '"'=299
'%'=300 '`'=300
'||'=301 ':'=301
'--'=302 '*'=302
'/'=303 '_'=303
'-'=304
'+'=305
'%'=306
'||'=307
'--'=308
'/'=309

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -187,126 +187,134 @@ COMPACT=186
CONCATENATE=187 CONCATENATE=187
CHANGE=188 CHANGE=188
CASCADE=189 CASCADE=189
RESTRICT=190 CONSTRAINT=190
CLUSTERED=191 RESTRICT=191
SORTED=192 CLUSTERED=192
PURGE=193 SORTED=193
INPUTFORMAT=194 PURGE=194
OUTPUTFORMAT=195 INPUTFORMAT=195
DATABASE=196 OUTPUTFORMAT=196
DATABASES=197 DATABASE=197
DFS=198 DATABASES=198
TRUNCATE=199 DFS=199
ANALYZE=200 TRUNCATE=200
COMPUTE=201 ANALYZE=201
LIST=202 COMPUTE=202
STATISTICS=203 LIST=203
PARTITIONED=204 STATISTICS=204
EXTERNAL=205 PARTITIONED=205
DEFINED=206 EXTERNAL=206
REVOKE=207 DEFINED=207
GRANT=208 REVOKE=208
LOCK=209 GRANT=209
UNLOCK=210 LOCK=210
MSCK=211 UNLOCK=211
REPAIR=212 MSCK=212
RECOVER=213 REPAIR=213
EXPORT=214 RECOVER=214
IMPORT=215 EXPORT=215
LOAD=216 IMPORT=216
ROLE=217 LOAD=217
ROLES=218 ROLE=218
COMPACTIONS=219 ROLES=219
PRINCIPALS=220 COMPACTIONS=220
TRANSACTIONS=221 PRINCIPALS=221
INDEX=222 TRANSACTIONS=222
INDEXES=223 INDEX=223
LOCKS=224 INDEXES=224
OPTION=225 LOCKS=225
ANTI=226 OPTION=226
LOCAL=227 ANTI=227
INPATH=228 LOCAL=228
WATERMARK=229 INPATH=229
UNNEST=230 WATERMARK=230
MATCH_RECOGNIZE=231 UNNEST=231
MEASURES=232 MATCH_RECOGNIZE=232
ONE=233 MEASURES=233
PER=234 ONE=234
MATCH=235 PER=235
SKIP1=236 MATCH=236
NEXT=237 SKIP1=237
PAST=238 NEXT=238
PATTERN=239 PAST=239
WITHIN=240 PATTERN=240
DEFINE=241 WITHIN=241
WS=242 DEFINE=242
SYSTEM=243 WS=243
INCLUDING=244 SYSTEM=244
EXCLUDING=245 INCLUDING=245
CONSTRAINTS=246 EXCLUDING=246
OVERWRITING=247 CONSTRAINTS=247
GENERATED=248 OVERWRITING=248
CATALOG=249 GENERATED=249
LANGUAGE=250 CATALOG=250
CATALOGS=251 LANGUAGE=251
VIEWS=252 CATALOGS=252
STRING=253 VIEWS=253
ARRAY=254 PRIMARY=254
MAP=255 KEY=255
CHAR=256 PERIOD=256
VARCHAR=257 SYSTEM_TIME=257
BINARY=258 STRING=258
VARBINARY=259 ARRAY=259
BYTES=260 MAP=260
DECIMAL=261 CHAR=261
TINYINT=262 VARCHAR=262
SMALLINT=263 BINARY=263
INT=264 VARBINARY=264
BIGINT=265 BYTES=265
FLOAT=266 DECIMAL=266
DOUBLE=267 TINYINT=267
DATE=268 SMALLINT=268
TIME=269 INT=269
TIMESTAMP=270 BIGINT=270
MULTISET=271 FLOAT=271
BOOLEAN=272 DOUBLE=272
RAW=273 DATE=273
ROW=274 TIME=274
NULL=275 TIMESTAMP=275
EQUAL_SYMBOL=276 MULTISET=276
GREATER_SYMBOL=277 BOOLEAN=277
LESS_SYMBOL=278 RAW=278
EXCLAMATION_SYMBOL=279 ROW=279
BIT_NOT_OP=280 NULL=280
BIT_OR_OP=281 DATETIME=281
BIT_AND_OP=282 EQUAL_SYMBOL=282
BIT_XOR_OP=283 GREATER_SYMBOL=283
DOT=284 LESS_SYMBOL=284
LS_BRACKET=285 EXCLAMATION_SYMBOL=285
RS_BRACKET=286 BIT_NOT_OP=286
LR_BRACKET=287 BIT_OR_OP=287
RR_BRACKET=288 BIT_AND_OP=288
COMMA=289 BIT_XOR_OP=289
SEMICOLON=290 DOT=290
AT_SIGN=291 LS_BRACKET=291
SINGLE_QUOTE_SYMB=292 RS_BRACKET=292
DOUBLE_QUOTE_SYMB=293 LR_BRACKET=293
REVERSE_QUOTE_SYMB=294 RR_BRACKET=294
COLON_SYMB=295 COMMA=295
ASTERISK_SIGN=296 SEMICOLON=296
UNDERLINE_SIGN=297 AT_SIGN=297
HYPNEN_SIGN=298 SINGLE_QUOTE_SYMB=298
ADD_SIGN=299 DOUBLE_QUOTE_SYMB=299
PENCENT_SIGN=300 REVERSE_QUOTE_SYMB=300
DOUBLE_VERTICAL_SIGN=301 COLON_SYMB=301
DOUBLE_HYPNEN_SIGN=302 ASTERISK_SIGN=302
SLASH_SIGN=303 UNDERLINE_SIGN=303
DOT_ID=304 HYPNEN_SIGN=304
STRING_LITERAL=305 ADD_SIGN=305
DIG_LITERAL=306 PENCENT_SIGN=306
REAL_LITERAL=307 DOUBLE_VERTICAL_SIGN=307
BIT_STRING=308 DOUBLE_HYPNEN_SIGN=308
ID=309 SLASH_SIGN=309
DOT_ID=310
PLUS_DOT_ID=311
STRING_LITERAL=312
DIG_LITERAL=313
REAL_LITERAL=314
BIT_STRING=315
ID_LITERAL=316
PLUS_ID_LITERAL=317
'SELECT'=4 'SELECT'=4
'FROM'=5 'FROM'=5
'ADD'=6 'ADD'=6
@ -493,117 +501,123 @@ ID=309
'CONCATENATE'=187 'CONCATENATE'=187
'CHANGE'=188 'CHANGE'=188
'CASCADE'=189 'CASCADE'=189
'RESTRICT'=190 'CONSTRAINT'=190
'CLUSTERED'=191 'RESTRICT'=191
'SORTED'=192 'CLUSTERED'=192
'PURGE'=193 'SORTED'=193
'INPUTFORMAT'=194 'PURGE'=194
'OUTPUTFORMAT'=195 'INPUTFORMAT'=195
'DATABASE'=196 'OUTPUTFORMAT'=196
'DATABASES'=197 'DATABASE'=197
'DFS'=198 'DATABASES'=198
'TRUNCATE'=199 'DFS'=199
'ANALYZE'=200 'TRUNCATE'=200
'COMPUTE'=201 'ANALYZE'=201
'LIST'=202 'COMPUTE'=202
'STATISTICS'=203 'LIST'=203
'PARTITIONED'=204 'STATISTICS'=204
'EXTERNAL'=205 'PARTITIONED'=205
'DEFINED'=206 'EXTERNAL'=206
'REVOKE'=207 'DEFINED'=207
'GRANT'=208 'REVOKE'=208
'LOCK'=209 'GRANT'=209
'UNLOCK'=210 'LOCK'=210
'MSCK'=211 'UNLOCK'=211
'REPAIR'=212 'MSCK'=212
'RECOVER'=213 'REPAIR'=213
'EXPORT'=214 'RECOVER'=214
'IMPORT'=215 'EXPORT'=215
'LOAD'=216 'IMPORT'=216
'ROLE'=217 'LOAD'=217
'ROLES'=218 'ROLE'=218
'COMPACTIONS'=219 'ROLES'=219
'PRINCIPALS'=220 'COMPACTIONS'=220
'TRANSACTIONS'=221 'PRINCIPALS'=221
'INDEX'=222 'TRANSACTIONS'=222
'INDEXES'=223 'INDEX'=223
'LOCKS'=224 'INDEXES'=224
'OPTION'=225 'LOCKS'=225
'ANTI'=226 'OPTION'=226
'LOCAL'=227 'ANTI'=227
'INPATH'=228 'LOCAL'=228
'WATERMARK'=229 'INPATH'=229
'UNNEST'=230 'WATERMARK'=230
'MATCH_RECOGNIZE'=231 'UNNEST'=231
'MEASURES'=232 'MATCH_RECOGNIZE'=232
'ONE'=233 'MEASURES'=233
'PER'=234 'ONE'=234
'MATCH'=235 'PER'=235
'SKIP1'=236 'MATCH'=236
'NEXT'=237 'SKIP1'=237
'PAST'=238 'NEXT'=238
'PATTERN'=239 'PAST'=239
'WITHIN'=240 'PATTERN'=240
'DEFINE'=241 'WITHIN'=241
'WS'=242 'DEFINE'=242
'SYSTEM'=243 'WS'=243
'INCLUDING'=244 'SYSTEM'=244
'EXCLUDING'=245 'INCLUDING'=245
'CONSTRAINTS'=246 'EXCLUDING'=246
'OVERWRITING'=247 'CONSTRAINTS'=247
'GENERATED'=248 'OVERWRITING'=248
'CATALOG'=249 'GENERATED'=249
'LANGUAGE'=250 'CATALOG'=250
'CATALOGS'=251 'LANGUAGE'=251
'VIEWS'=252 'CATALOGS'=252
'STRING'=253 'VIEWS'=253
'ARRAY'=254 'PRIMARY'=254
'MAP'=255 'KEY'=255
'CHAR'=256 'PERIOD'=256
'VARCHAR'=257 'SYSTEM_TIME'=257
'BINARY'=258 'STRING'=258
'VARBINARY'=259 'ARRAY'=259
'BYTES'=260 'MAP'=260
'DECIMAL'=261 'CHAR'=261
'TINYINT'=262 'VARCHAR'=262
'SMALLINT'=263 'BINARY'=263
'INT'=264 'VARBINARY'=264
'BIGINT'=265 'BYTES'=265
'FLOAT'=266 'DECIMAL'=266
'DOUBLE'=267 'TINYINT'=267
'DATE'=268 'SMALLINT'=268
'TIME'=269 'INT'=269
'TIMESTAMP'=270 'BIGINT'=270
'MULTISET'=271 'FLOAT'=271
'BOOLEAN'=272 'DOUBLE'=272
'RAW'=273 'DATE'=273
'ROW'=274 'TIME'=274
'NULL'=275 'TIMESTAMP'=275
'='=276 'MULTISET'=276
'>'=277 'BOOLEAN'=277
'<'=278 'RAW'=278
'!'=279 'ROW'=279
'~'=280 'NULL'=280
'|'=281 'DATETIME'=281
'&'=282 '='=282
'^'=283 '>'=283
'.'=284 '<'=284
'['=285 '!'=285
']'=286 '~'=286
'('=287 '|'=287
')'=288 '&'=288
','=289 '^'=289
';'=290 '.'=290
'@'=291 '['=291
'\''=292 ']'=292
'"'=293 '('=293
'`'=294 ')'=294
':'=295 ','=295
'*'=296 ';'=296
'_'=297 '@'=297
'-'=298 '\''=298
'+'=299 '"'=299
'%'=300 '`'=300
'||'=301 ':'=301
'--'=302 '*'=302
'/'=303 '_'=303
'-'=304
'+'=305
'%'=306
'||'=307
'--'=308
'/'=309

View File

@ -137,6 +137,15 @@ FlinkSqlParserListener.prototype.exitColumnName = function(ctx) {
}; };
// Enter a parse tree produced by FlinkSqlParser#columnNameList.
FlinkSqlParserListener.prototype.enterColumnNameList = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#columnNameList.
FlinkSqlParserListener.prototype.exitColumnNameList = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#columnType. // Enter a parse tree produced by FlinkSqlParser#columnType.
FlinkSqlParserListener.prototype.enterColumnType = function(ctx) { FlinkSqlParserListener.prototype.enterColumnType = function(ctx) {
}; };
@ -173,6 +182,24 @@ FlinkSqlParserListener.prototype.exitWatermarkDefinition = function(ctx) {
}; };
// Enter a parse tree produced by FlinkSqlParser#tableConstraint.
FlinkSqlParserListener.prototype.enterTableConstraint = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#tableConstraint.
FlinkSqlParserListener.prototype.exitTableConstraint = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#selfDefinitionClause.
FlinkSqlParserListener.prototype.enterSelfDefinitionClause = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#selfDefinitionClause.
FlinkSqlParserListener.prototype.exitSelfDefinitionClause = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#partitionDefinition. // Enter a parse tree produced by FlinkSqlParser#partitionDefinition.
FlinkSqlParserListener.prototype.enterPartitionDefinition = function(ctx) { FlinkSqlParserListener.prototype.enterPartitionDefinition = function(ctx) {
}; };
@ -749,6 +776,15 @@ FlinkSqlParserListener.prototype.exitSubqueryExpression = function(ctx) {
}; };
// Enter a parse tree produced by FlinkSqlParser#cast.
FlinkSqlParserListener.prototype.enterCast = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#cast.
FlinkSqlParserListener.prototype.exitCast = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#constantDefault. // Enter a parse tree produced by FlinkSqlParser#constantDefault.
FlinkSqlParserListener.prototype.enterConstantDefault = function(ctx) { FlinkSqlParserListener.prototype.enterConstantDefault = function(ctx) {
}; };
@ -884,6 +920,15 @@ FlinkSqlParserListener.prototype.exitIntervalValue = function(ctx) {
}; };
// Enter a parse tree produced by FlinkSqlParser#columnAlias.
FlinkSqlParserListener.prototype.enterColumnAlias = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#columnAlias.
FlinkSqlParserListener.prototype.exitColumnAlias = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#tableAlias. // Enter a parse tree produced by FlinkSqlParser#tableAlias.
FlinkSqlParserListener.prototype.enterTableAlias = function(ctx) { FlinkSqlParserListener.prototype.enterTableAlias = function(ctx) {
}; };
@ -1010,6 +1055,15 @@ FlinkSqlParserListener.prototype.exitUid = function(ctx) {
}; };
// Enter a parse tree produced by FlinkSqlParser#plusUid.
FlinkSqlParserListener.prototype.enterPlusUid = function(ctx) {
};
// Exit a parse tree produced by FlinkSqlParser#plusUid.
FlinkSqlParserListener.prototype.exitPlusUid = function(ctx) {
};
// Enter a parse tree produced by FlinkSqlParser#withOption. // Enter a parse tree produced by FlinkSqlParser#withOption.
FlinkSqlParserListener.prototype.enterWithOption = function(ctx) { FlinkSqlParserListener.prototype.enterWithOption = function(ctx) {
}; };

View File

@ -96,6 +96,12 @@ FlinkSqlParserVisitor.prototype.visitColumnName = function(ctx) {
}; };
// Visit a parse tree produced by FlinkSqlParser#columnNameList.
FlinkSqlParserVisitor.prototype.visitColumnNameList = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#columnType. // Visit a parse tree produced by FlinkSqlParser#columnType.
FlinkSqlParserVisitor.prototype.visitColumnType = function(ctx) { FlinkSqlParserVisitor.prototype.visitColumnType = function(ctx) {
return this.visitChildren(ctx); return this.visitChildren(ctx);
@ -120,6 +126,18 @@ FlinkSqlParserVisitor.prototype.visitWatermarkDefinition = function(ctx) {
}; };
// Visit a parse tree produced by FlinkSqlParser#tableConstraint.
FlinkSqlParserVisitor.prototype.visitTableConstraint = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#selfDefinitionClause.
FlinkSqlParserVisitor.prototype.visitSelfDefinitionClause = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#partitionDefinition. // Visit a parse tree produced by FlinkSqlParser#partitionDefinition.
FlinkSqlParserVisitor.prototype.visitPartitionDefinition = function(ctx) { FlinkSqlParserVisitor.prototype.visitPartitionDefinition = function(ctx) {
return this.visitChildren(ctx); return this.visitChildren(ctx);
@ -504,6 +522,12 @@ FlinkSqlParserVisitor.prototype.visitSubqueryExpression = function(ctx) {
}; };
// Visit a parse tree produced by FlinkSqlParser#cast.
FlinkSqlParserVisitor.prototype.visitCast = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#constantDefault. // Visit a parse tree produced by FlinkSqlParser#constantDefault.
FlinkSqlParserVisitor.prototype.visitConstantDefault = function(ctx) { FlinkSqlParserVisitor.prototype.visitConstantDefault = function(ctx) {
return this.visitChildren(ctx); return this.visitChildren(ctx);
@ -594,6 +618,12 @@ FlinkSqlParserVisitor.prototype.visitIntervalValue = function(ctx) {
}; };
// Visit a parse tree produced by FlinkSqlParser#columnAlias.
FlinkSqlParserVisitor.prototype.visitColumnAlias = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#tableAlias. // Visit a parse tree produced by FlinkSqlParser#tableAlias.
FlinkSqlParserVisitor.prototype.visitTableAlias = function(ctx) { FlinkSqlParserVisitor.prototype.visitTableAlias = function(ctx) {
return this.visitChildren(ctx); return this.visitChildren(ctx);
@ -678,6 +708,12 @@ FlinkSqlParserVisitor.prototype.visitUid = function(ctx) {
}; };
// Visit a parse tree produced by FlinkSqlParser#plusUid.
FlinkSqlParserVisitor.prototype.visitPlusUid = function(ctx) {
return this.visitChildren(ctx);
};
// Visit a parse tree produced by FlinkSqlParser#withOption. // Visit a parse tree produced by FlinkSqlParser#withOption.
FlinkSqlParserVisitor.prototype.visitWithOption = function(ctx) { FlinkSqlParserVisitor.prototype.visitWithOption = function(ctx) {
return this.visitChildren(ctx); return this.visitChildren(ctx);