@@ -29,12 +29,12 @@ sqlStatement
29
29
| describeStatement
30
30
| explainStatement
31
31
| useStatement
32
- | showStatememt
32
+ | showStatement
33
33
| loadStatement
34
- | unloadStatememt
35
- | setStatememt
36
- | resetStatememt
37
- | jarStatememt
34
+ | unloadStatement
35
+ | setStatement
36
+ | resetStatement
37
+ | jarStatement
38
38
| dtAddStatement
39
39
;
40
40
@@ -64,7 +64,7 @@ dmlStatement
64
64
| insertStatement
65
65
;
66
66
67
- // some statemen
67
+ // some statement
68
68
describeStatement
69
69
: (KW_DESCRIBE | KW_DESC ) tablePath
70
70
;
@@ -97,7 +97,7 @@ useModuleStatement
97
97
: KW_USE KW_MODULES uid (COMMA uid)*
98
98
;
99
99
100
- showStatememt
100
+ showStatement
101
101
: KW_SHOW (KW_CATALOGS | KW_DATABASES | KW_VIEWS | KW_JARS )
102
102
| KW_SHOW KW_CURRENT (KW_CATALOG | KW_DATABASE )
103
103
| KW_SHOW KW_TABLES (( KW_FROM | KW_IN ) databasePath)? likePredicate?
@@ -111,19 +111,19 @@ loadStatement
111
111
: KW_LOAD KW_MODULE uid (KW_WITH tablePropertyList)?
112
112
;
113
113
114
- unloadStatememt
114
+ unloadStatement
115
115
: KW_UNLOAD KW_MODULE uid
116
116
;
117
117
118
- setStatememt
118
+ setStatement
119
119
: KW_SET (tableProperty)?
120
120
;
121
121
122
- resetStatememt
122
+ resetStatement
123
123
: KW_RESET tablePropertyKey?
124
124
;
125
125
126
- jarStatememt
126
+ jarStatement
127
127
: (KW_ADD | KW_REMOVE ) KW_JAR jarFileName
128
128
;
129
129
@@ -338,7 +338,7 @@ jarFileName
338
338
;
339
339
340
340
// Alter statements
341
- // Just for simple alter table statements,
341
+ // Just for simple alter table statements,
342
342
// it only includes rename, set key, add constraint, drop constraint, add unique
343
343
344
344
alterTable
@@ -449,15 +449,15 @@ insertMulStatement
449
449
// Select statements
450
450
451
451
queryStatement
452
- : valuesCaluse
452
+ : valuesClause
453
453
| withClause queryStatement
454
454
| LR_BRACKET queryStatement RR_BRACKET
455
- | left=queryStatement operator=(KW_INTERSECT | KW_UNION | KW_EXCEPT ) KW_ALL ? right=queryStatement orderByCaluse ? limitClause?
456
- | selectClause orderByCaluse ? limitClause?
457
- | selectStatement orderByCaluse ? limitClause?
455
+ | left=queryStatement operator=(KW_INTERSECT | KW_UNION | KW_EXCEPT ) KW_ALL ? right=queryStatement orderByClause ? limitClause?
456
+ | selectClause orderByClause ? limitClause?
457
+ | selectStatement orderByClause ? limitClause?
458
458
;
459
459
460
- valuesCaluse
460
+ valuesClause
461
461
: KW_VALUES expression (COMMA expression)*
462
462
;
463
463
@@ -505,7 +505,7 @@ tableExpression
505
505
| tableExpression KW_NATURAL ? (KW_LEFT | KW_RIGHT | KW_FULL | KW_INNER )? KW_OUTER ? KW_JOIN tableExpression joinCondition?
506
506
| tableExpression KW_CROSS KW_JOIN tableExpression
507
507
| inlineDataValueClause
508
- | windoTVFClause
508
+ | windowTVFClause
509
509
;
510
510
511
511
tableReference
@@ -532,15 +532,15 @@ inlineDataValueClause
532
532
: LR_BRACKET valuesDefinition RR_BRACKET tableAlias
533
533
;
534
534
535
- windoTVFClause
536
- : KW_TABLE LR_BRACKET windowTVFExression RR_BRACKET
535
+ windowTVFClause
536
+ : KW_TABLE LR_BRACKET windowTVFExpression RR_BRACKET
537
537
;
538
538
539
- windowTVFExression
540
- : windoTVFName LR_BRACKET windowTVFParam (COMMA windowTVFParam)* RR_BRACKET
539
+ windowTVFExpression
540
+ : windowTVFName LR_BRACKET windowTVFParam (COMMA windowTVFParam)* RR_BRACKET
541
541
;
542
542
543
- windoTVFName
543
+ windowTVFName
544
544
: KW_TUMBLE
545
545
| KW_HOP
546
546
| KW_CUMULATE
@@ -586,7 +586,7 @@ groupItemDefinition
586
586
| groupWindowFunction
587
587
| LR_BRACKET RR_BRACKET
588
588
| LR_BRACKET expression (COMMA expression)* RR_BRACKET
589
- | groupingSetsNotaionName LR_BRACKET expression (COMMA expression)* RR_BRACKET
589
+ | groupingSetsNotationName LR_BRACKET expression (COMMA expression)* RR_BRACKET
590
590
| groupingSets LR_BRACKET groupItemDefinition (COMMA groupItemDefinition)* RR_BRACKET
591
591
| expression
592
592
;
@@ -595,7 +595,7 @@ groupingSets
595
595
: KW_GROUPING KW_SETS
596
596
;
597
597
598
- groupingSetsNotaionName
598
+ groupingSetsNotationName
599
599
: KW_CUBE
600
600
| KW_ROLLUP
601
601
;
@@ -627,19 +627,19 @@ namedWindow
627
627
;
628
628
629
629
windowSpec
630
- : name=errorCapturingIdentifier? LR_BRACKET partitionByClause? orderByCaluse ? windowFrame? RR_BRACKET
630
+ : name=errorCapturingIdentifier? LR_BRACKET partitionByClause? orderByClause ? windowFrame? RR_BRACKET
631
631
;
632
632
633
633
matchRecognizeClause
634
- : KW_MATCH_RECOGNIZE LR_BRACKET partitionByClause? orderByCaluse ? measuresClause? outputMode? afterMatchStrategy? patternDefination ?
635
- patternVariablesDefination RR_BRACKET (KW_AS ? identifier)?
634
+ : KW_MATCH_RECOGNIZE LR_BRACKET partitionByClause? orderByClause ? measuresClause? outputMode? afterMatchStrategy? patternDefinition ?
635
+ patternVariablesDefinition RR_BRACKET (KW_AS ? identifier)?
636
636
;
637
637
638
- orderByCaluse
639
- : KW_ORDER KW_BY orderItemDefition (COMMA orderItemDefition )*
638
+ orderByClause
639
+ : KW_ORDER KW_BY orderItemDefinition (COMMA orderItemDefinition )*
640
640
;
641
641
642
- orderItemDefition
642
+ orderItemDefinition
643
643
: columnName ordering=(KW_ASC | KW_DESC )? (KW_NULLS nullOrder=(KW_LAST | KW_FIRST ))?
644
644
;
645
645
@@ -664,7 +664,7 @@ measuresClause
664
664
: KW_MEASURES projectItemDefinition (COMMA projectItemDefinition)*
665
665
;
666
666
667
- patternDefination
667
+ patternDefinition
668
668
: KW_PATTERN LR_BRACKET patternVariable+ RR_BRACKET withinClause?
669
669
;
670
670
@@ -684,7 +684,7 @@ afterMatchStrategy
684
684
| KW_AFTER KW_MATCH KW_SKIP KW_TO KW_FIRST unquotedIdentifier
685
685
;
686
686
687
- patternVariablesDefination
687
+ patternVariablesDefinition
688
688
: KW_DEFINE projectItemDefinition (COMMA projectItemDefinition)*
689
689
;
690
690
@@ -739,9 +739,9 @@ likePredicate
739
739
740
740
valueExpression
741
741
: primaryExpression # valueExpressionDefault
742
- | operator=(HYPNEN_SIGN | ADD_SIGN | BIT_NOT_OP ) valueExpression # arithmeticUnary
743
- | left=valueExpression operator=(ASTERISK_SIGN | SLASH_SIGN | PENCENT_SIGN | KW_DIV ) right=valueExpression # arithmeticBinary
744
- | left=valueExpression operator=(ADD_SIGN | HYPNEN_SIGN | DOUBLE_VERTICAL_SIGN ) right=valueExpression # arithmeticBinary
742
+ | operator=(HYPHEN_SIGN | ADD_SIGN | BIT_NOT_OP ) valueExpression # arithmeticUnary
743
+ | left=valueExpression operator=(ASTERISK_SIGN | SLASH_SIGN | PERCENT_SIGN | KW_DIV ) right=valueExpression # arithmeticBinary
744
+ | left=valueExpression operator=(ADD_SIGN | HYPHEN_SIGN | DOUBLE_VERTICAL_SIGN ) right=valueExpression # arithmeticBinary
745
745
| left=valueExpression operator=BIT_AND_OP right=valueExpression # arithmeticBinary
746
746
| left=valueExpression operator=BIT_XOR_OP right=valueExpression # arithmeticBinary
747
747
| left=valueExpression operator=BIT_OR_OP right=valueExpression # arithmeticBinary
@@ -854,7 +854,7 @@ unitToUnitInterval
854
854
;
855
855
856
856
intervalValue
857
- : (ADD_SIGN | HYPNEN_SIGN )? (DIG_LITERAL | REAL_LITERAL )
857
+ : (ADD_SIGN | HYPHEN_SIGN )? (DIG_LITERAL | REAL_LITERAL )
858
858
| STRING_LITERAL
859
859
;
860
860
@@ -1000,26 +1000,26 @@ bitOperator
1000
1000
mathOperator
1001
1001
: ASTERISK_SIGN
1002
1002
| SLASH_SIGN
1003
- | PENCENT_SIGN
1003
+ | PERCENT_SIGN
1004
1004
| KW_DIV
1005
1005
| ADD_SIGN
1006
- | HYPNEN_SIGN
1007
- | DOUBLE_HYPNEN_SIGN
1006
+ | HYPHEN_SIGN
1007
+ | DOUBLE_HYPHEN_SIGN
1008
1008
;
1009
1009
1010
1010
unaryOperator
1011
1011
: EXCLAMATION_SYMBOL
1012
1012
| BIT_NOT_OP
1013
1013
| ADD_SIGN
1014
- | HYPNEN_SIGN
1014
+ | HYPHEN_SIGN
1015
1015
| KW_NOT
1016
1016
;
1017
1017
1018
1018
constant
1019
1019
: timeIntervalExpression
1020
1020
| timePointLiteral
1021
1021
| stringLiteral // 引号包含的字符串
1022
- | HYPNEN_SIGN ? decimalLiteral // 正/负整数
1022
+ | HYPHEN_SIGN ? decimalLiteral // 正/负整数
1023
1023
| booleanLiteral // 布尔值
1024
1024
| REAL_LITERAL // 小数
1025
1025
| BIT_STRING
0 commit comments