dt-sql-parser 4.5.0-beta.1 → 4.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/dist/index.js +2 -2
  3. package/dist/lib/SQLParserBase.d.ts +1 -13
  4. package/dist/lib/SQLParserBase.js +5 -40
  5. package/dist/lib/flink/FlinkSqlParser.d.ts +179 -222
  6. package/dist/lib/flink/FlinkSqlParser.js +2949 -3300
  7. package/dist/lib/flink/FlinkSqlParserListener.d.ts +0 -33
  8. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +0 -21
  9. package/dist/lib/generic/GenericSqlLexer.d.ts +143 -0
  10. package/dist/lib/generic/GenericSqlLexer.js +603 -0
  11. package/dist/lib/generic/GenericSqlListener.d.ts +1089 -0
  12. package/dist/lib/generic/GenericSqlListener.js +11 -0
  13. package/dist/lib/generic/GenericSqlParser.d.ts +1272 -0
  14. package/dist/lib/generic/GenericSqlParser.js +7641 -0
  15. package/dist/lib/generic/GenericSqlVisitor.d.ts +684 -0
  16. package/dist/lib/generic/GenericSqlVisitor.js +12 -0
  17. package/dist/lib/hive/HiveSqlParser.d.ts +228 -274
  18. package/dist/lib/hive/HiveSqlParser.js +5912 -6304
  19. package/dist/lib/hive/HiveSqlParserListener.d.ts +0 -33
  20. package/dist/lib/hive/HiveSqlParserVisitor.d.ts +0 -21
  21. package/dist/lib/impala/ImpalaSqlParser.d.ts +103 -145
  22. package/dist/lib/impala/ImpalaSqlParser.js +3320 -3687
  23. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +0 -33
  24. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +0 -21
  25. package/dist/lib/index.d.ts +2 -0
  26. package/dist/lib/index.js +2 -0
  27. package/dist/lib/mysql/MySqlParser.d.ts +94 -161
  28. package/dist/lib/mysql/MySqlParser.js +9499 -9959
  29. package/dist/lib/mysql/MySqlParserListener.d.ts +5 -79
  30. package/dist/lib/mysql/MySqlParserVisitor.d.ts +3 -49
  31. package/dist/lib/postgresql/PostgreSqlParser.d.ts +71 -108
  32. package/dist/lib/postgresql/PostgreSqlParser.js +10388 -13330
  33. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +0 -48
  34. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +0 -30
  35. package/dist/lib/spark/SparkSqlParser.d.ts +145 -185
  36. package/dist/lib/spark/SparkSqlParser.js +5109 -5420
  37. package/dist/lib/spark/SparkSqlParserListener.d.ts +0 -33
  38. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +0 -21
  39. package/dist/parser/common/basicSQL.d.ts +5 -5
  40. package/dist/parser/common/basicSQL.js +3 -3
  41. package/dist/parser/common/entityCollector.js +2 -14
  42. package/dist/parser/flink/index.js +2 -5
  43. package/dist/parser/generic/genericEntityCollector.d.ts +29 -0
  44. package/dist/parser/generic/genericEntityCollector.js +103 -0
  45. package/dist/parser/generic/genericErrorListener.d.ts +6 -0
  46. package/dist/parser/generic/genericErrorListener.js +56 -0
  47. package/dist/parser/generic/genericSemanticContextCollector.d.ts +9 -0
  48. package/dist/parser/generic/genericSemanticContextCollector.js +14 -0
  49. package/dist/parser/generic/genericSplitListener.d.ts +6 -0
  50. package/dist/parser/generic/genericSplitListener.js +6 -0
  51. package/dist/parser/generic/index.d.ts +33 -0
  52. package/dist/parser/generic/index.js +94 -0
  53. package/dist/parser/index.d.ts +1 -0
  54. package/dist/parser/index.js +1 -0
  55. package/dist/parser/mysql/index.js +1 -3
  56. package/dist/parser/mysql/mysqlEntityCollector.d.ts +1 -2
  57. package/dist/parser/mysql/mysqlEntityCollector.js +3 -13
  58. package/dist/parser/mysql/mysqlErrorListener.js +0 -2
  59. package/dist/parser/postgresql/postgreEntityCollector.d.ts +1 -3
  60. package/dist/parser/postgresql/postgreEntityCollector.js +0 -13
  61. package/dist/parser/spark/index.js +1 -3
  62. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export { MySQL, FlinkSQL, SparkSQL, HiveSQL, PostgreSQL, TrinoSQL, ImpalaSQL } from './parser';
2
- export { MySqlParserListener, MySqlParserVisitor, FlinkSqlParserListener, FlinkSqlParserVisitor, SparkSqlParserListener, SparkSqlParserVisitor, HiveSqlParserListener, HiveSqlParserVisitor, PostgreSqlParserListener, PostgreSqlParserVisitor, TrinoSqlListener, TrinoSqlVisitor, ImpalaSqlParserListener, ImpalaSqlParserVisitor, } from './lib';
1
+ export { MySQL, FlinkSQL, SparkSQL, HiveSQL, PostgreSQL, TrinoSQL, ImpalaSQL, GenericSQL, } from './parser';
2
+ export { MySqlParserListener, MySqlParserVisitor, FlinkSqlParserListener, FlinkSqlParserVisitor, SparkSqlParserListener, SparkSqlParserVisitor, HiveSqlParserListener, HiveSqlParserVisitor, PostgreSqlParserListener, PostgreSqlParserVisitor, TrinoSqlListener, TrinoSqlVisitor, ImpalaSqlParserListener, ImpalaSqlParserVisitor, GenericSqlListener, GenericSqlVisitor, } from './lib';
3
3
  export { EntityContextType } from './parser/common/types';
4
4
  export { StmtContextType } from './parser/common/entityCollector';
5
5
  export type { CaretPosition, Suggestions, SyntaxSuggestion } from './parser/common/types';
6
6
  export type { WordRange, TextSlice } from './parser/common/textAndWord';
7
7
  export type { SyntaxError, ParseError, ErrorListener } from './parser/common/parseErrorListener';
8
+ export type { GenericSQLOptions } from './parser/generic';
8
9
  export type { StmtContext, EntityContext, CommonEntityContext, ColumnEntityContext, FuncEntityContext, } from './parser/common/entityCollector';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { MySQL, FlinkSQL, SparkSQL, HiveSQL, PostgreSQL, TrinoSQL, ImpalaSQL } from './parser';
2
- export { MySqlParserListener, MySqlParserVisitor, FlinkSqlParserListener, FlinkSqlParserVisitor, SparkSqlParserListener, SparkSqlParserVisitor, HiveSqlParserListener, HiveSqlParserVisitor, PostgreSqlParserListener, PostgreSqlParserVisitor, TrinoSqlListener, TrinoSqlVisitor, ImpalaSqlParserListener, ImpalaSqlParserVisitor, } from './lib';
1
+ export { MySQL, FlinkSQL, SparkSQL, HiveSQL, PostgreSQL, TrinoSQL, ImpalaSQL, GenericSQL, } from './parser';
2
+ export { MySqlParserListener, MySqlParserVisitor, FlinkSqlParserListener, FlinkSqlParserVisitor, SparkSqlParserListener, SparkSqlParserVisitor, HiveSqlParserListener, HiveSqlParserVisitor, PostgreSqlParserListener, PostgreSqlParserVisitor, TrinoSqlListener, TrinoSqlVisitor, ImpalaSqlParserListener, ImpalaSqlParserVisitor, GenericSqlListener, GenericSqlVisitor, } from './lib';
3
3
  export { EntityContextType } from './parser/common/types';
4
4
  export { StmtContextType } from './parser/common/entityCollector';
@@ -4,17 +4,5 @@ export declare abstract class SQLParserBase<T = antlr.ParserRuleContext> extends
4
4
  abstract program(): T;
5
5
  caretTokenIndex: number;
6
6
  entityCollecting: boolean;
7
- /**
8
- * Semantic predicate to determine whether to match empty column.
9
- *
10
- * Key design:
11
- * 1. Only match empty column in entityCollecting mode
12
- * 2. Check if caret position is at the empty column position
13
- * 3. In validate mode (entityCollecting=false), this predicate returns false
14
- * and reports an error to ensure incomplete SQL is caught
15
- *
16
- * IMPORTANT: This predicate should be used carefully to avoid affecting
17
- * prediction in non-entity-collecting contexts.
18
- */
19
- shouldMatchEmpty(ruleName?: string): boolean;
7
+ shouldMatchEmpty(): boolean;
20
8
  }
@@ -5,45 +5,10 @@ export class SQLParserBase extends antlr.Parser {
5
5
  this.caretTokenIndex = -1;
6
6
  this.entityCollecting = false;
7
7
  }
8
- /**
9
- * Semantic predicate to determine whether to match empty column.
10
- *
11
- * Key design:
12
- * 1. Only match empty column in entityCollecting mode
13
- * 2. Check if caret position is at the empty column position
14
- * 3. In validate mode (entityCollecting=false), this predicate returns false
15
- * and reports an error to ensure incomplete SQL is caught
16
- *
17
- * IMPORTANT: This predicate should be used carefully to avoid affecting
18
- * prediction in non-entity-collecting contexts.
19
- */
20
- shouldMatchEmpty(ruleName) {
21
- var _a, _b;
22
- // Only match in entityCollecting mode or when caret position is specified (suggestion mode)
23
- if (this.entityCollecting || this.caretTokenIndex >= 0) {
24
- // If no caret position specified, match all empty columns
25
- if (this.caretTokenIndex < 0) {
26
- return true;
27
- }
28
- // Check if caret is at the position where empty column would be
29
- const prevTokenIndex = (_a = this.tokenStream.LT(-1)) === null || _a === void 0 ? void 0 : _a.tokenIndex;
30
- const nextTokenIndex = (_b = this.tokenStream.LT(1)) === null || _b === void 0 ? void 0 : _b.tokenIndex;
31
- // Match if caret is between previous and next token
32
- if (prevTokenIndex !== undefined && nextTokenIndex !== undefined) {
33
- return prevTokenIndex <= this.caretTokenIndex && nextTokenIndex >= this.caretTokenIndex;
34
- }
35
- // If only previous token exists, match if caret is after it
36
- if (prevTokenIndex !== undefined) {
37
- return prevTokenIndex <= this.caretTokenIndex;
38
- }
39
- // If only next token exists, match if caret is before it
40
- if (nextTokenIndex !== undefined) {
41
- return nextTokenIndex >= this.caretTokenIndex;
42
- }
43
- return false;
44
- }
45
- // In pure validate mode, don't match empty columns
46
- // This allows ANTLR to report errors naturally
47
- return false;
8
+ shouldMatchEmpty() {
9
+ var _a, _b, _c, _d;
10
+ return this.entityCollecting
11
+ && ((_b = (_a = this.tokenStream.LT(-1)) === null || _a === void 0 ? void 0 : _a.tokenIndex) !== null && _b !== void 0 ? _b : Infinity) <= this.caretTokenIndex
12
+ && ((_d = (_c = this.tokenStream.LT(1)) === null || _c === void 0 ? void 0 : _c.tokenIndex) !== null && _d !== void 0 ? _d : -Infinity) >= this.caretTokenIndex;
48
13
  }
49
14
  }
@@ -572,186 +572,183 @@ export declare class FlinkSqlParser extends SQLParserBase {
572
572
  static readonly RULE_columnOptionDefinition = 23;
573
573
  static readonly RULE_physicalColumnDefinition = 24;
574
574
  static readonly RULE_columnNameCreate = 25;
575
- static readonly RULE_emptyColumn = 26;
576
- static readonly RULE_columnName = 27;
577
- static readonly RULE_columnNamePath = 28;
578
- static readonly RULE_columnNamePathAllowEmpty = 29;
579
- static readonly RULE_columnNameList = 30;
580
- static readonly RULE_columnType = 31;
581
- static readonly RULE_lengthOneDimension = 32;
582
- static readonly RULE_lengthTwoOptionalDimension = 33;
583
- static readonly RULE_lengthTwoStringDimension = 34;
584
- static readonly RULE_lengthOneTypeDimension = 35;
585
- static readonly RULE_mapTypeDimension = 36;
586
- static readonly RULE_rowTypeDimension = 37;
587
- static readonly RULE_columnConstraint = 38;
588
- static readonly RULE_metadataColumnDefinition = 39;
589
- static readonly RULE_metadataKey = 40;
590
- static readonly RULE_computedColumnDefinition = 41;
591
- static readonly RULE_computedColumnExpression = 42;
592
- static readonly RULE_watermarkDefinition = 43;
593
- static readonly RULE_tableConstraint = 44;
594
- static readonly RULE_constraintName = 45;
595
- static readonly RULE_selfDefinitionClause = 46;
596
- static readonly RULE_partitionDefinition = 47;
597
- static readonly RULE_transformList = 48;
598
- static readonly RULE_transform = 49;
599
- static readonly RULE_transformArgument = 50;
600
- static readonly RULE_likeDefinition = 51;
601
- static readonly RULE_likeOption = 52;
602
- static readonly RULE_createCatalog = 53;
603
- static readonly RULE_createDatabase = 54;
604
- static readonly RULE_createView = 55;
605
- static readonly RULE_createFunction = 56;
606
- static readonly RULE_usingClause = 57;
607
- static readonly RULE_jarFileName = 58;
608
- static readonly RULE_alterTable = 59;
609
- static readonly RULE_renameDefinition = 60;
610
- static readonly RULE_setKeyValueDefinition = 61;
611
- static readonly RULE_addConstraint = 62;
612
- static readonly RULE_dropConstraint = 63;
613
- static readonly RULE_addUnique = 64;
614
- static readonly RULE_notForced = 65;
615
- static readonly RULE_alterView = 66;
616
- static readonly RULE_alterDatabase = 67;
617
- static readonly RULE_alterFunction = 68;
618
- static readonly RULE_dropCatalog = 69;
619
- static readonly RULE_dropTable = 70;
620
- static readonly RULE_dropDatabase = 71;
621
- static readonly RULE_dropView = 72;
622
- static readonly RULE_dropFunction = 73;
623
- static readonly RULE_insertStatement = 74;
624
- static readonly RULE_insertSimpleStatement = 75;
625
- static readonly RULE_insertPartitionDefinition = 76;
626
- static readonly RULE_valuesDefinition = 77;
627
- static readonly RULE_valuesRowDefinition = 78;
628
- static readonly RULE_valueDefinition = 79;
629
- static readonly RULE_insertMulStatementCompatibility = 80;
630
- static readonly RULE_insertMulStatement = 81;
631
- static readonly RULE_queryStatement = 82;
632
- static readonly RULE_valuesClause = 83;
633
- static readonly RULE_withClause = 84;
634
- static readonly RULE_withItem = 85;
635
- static readonly RULE_withItemName = 86;
636
- static readonly RULE_selectStatement = 87;
637
- static readonly RULE_selectClause = 88;
638
- static readonly RULE_selectList = 89;
639
- static readonly RULE_columnProjectItem = 90;
640
- static readonly RULE_selectWindowItemColumnName = 91;
641
- static readonly RULE_selectExpressionColumnName = 92;
642
- static readonly RULE_selectLiteralColumnName = 93;
643
- static readonly RULE_columnAlias = 94;
644
- static readonly RULE_projectItemDefinition = 95;
645
- static readonly RULE_tableAllColumns = 96;
646
- static readonly RULE_overWindowItem = 97;
647
- static readonly RULE_fromClause = 98;
648
- static readonly RULE_tableExpression = 99;
649
- static readonly RULE_tableReference = 100;
650
- static readonly RULE_tablePrimary = 101;
651
- static readonly RULE_atomFunctionTable = 102;
652
- static readonly RULE_atomExpressionTable = 103;
653
- static readonly RULE_systemTimePeriod = 104;
654
- static readonly RULE_dateTimeExpression = 105;
655
- static readonly RULE_inlineDataValueClause = 106;
656
- static readonly RULE_windowTVFClause = 107;
657
- static readonly RULE_windowTVFExpression = 108;
658
- static readonly RULE_windowTVFName = 109;
659
- static readonly RULE_windowTVFParam = 110;
660
- static readonly RULE_timeIntervalParamName = 111;
661
- static readonly RULE_columnDescriptor = 112;
662
- static readonly RULE_joinCondition = 113;
663
- static readonly RULE_whereClause = 114;
664
- static readonly RULE_groupByClause = 115;
665
- static readonly RULE_groupItemDefinition = 116;
666
- static readonly RULE_groupingSets = 117;
667
- static readonly RULE_groupingSetsNotationName = 118;
668
- static readonly RULE_groupWindowFunction = 119;
669
- static readonly RULE_groupWindowFunctionName = 120;
670
- static readonly RULE_timeAttrColumn = 121;
671
- static readonly RULE_havingClause = 122;
672
- static readonly RULE_windowClause = 123;
673
- static readonly RULE_namedWindow = 124;
674
- static readonly RULE_windowSpec = 125;
675
- static readonly RULE_matchRecognizeClause = 126;
676
- static readonly RULE_orderByClause = 127;
677
- static readonly RULE_orderItemDefinition = 128;
678
- static readonly RULE_limitClause = 129;
679
- static readonly RULE_partitionByClause = 130;
680
- static readonly RULE_quantifiers = 131;
681
- static readonly RULE_measuresClause = 132;
682
- static readonly RULE_patternDefinition = 133;
683
- static readonly RULE_patternVariable = 134;
684
- static readonly RULE_outputMode = 135;
685
- static readonly RULE_afterMatchStrategy = 136;
686
- static readonly RULE_patternVariablesDefinition = 137;
687
- static readonly RULE_windowFrame = 138;
688
- static readonly RULE_frameBound = 139;
689
- static readonly RULE_withinClause = 140;
690
- static readonly RULE_expression = 141;
691
- static readonly RULE_booleanExpression = 142;
692
- static readonly RULE_predicate = 143;
693
- static readonly RULE_likePredicate = 144;
694
- static readonly RULE_valueExpression = 145;
695
- static readonly RULE_functionCallExpression = 146;
696
- static readonly RULE_primaryExpression = 147;
697
- static readonly RULE_functionNameCreate = 148;
698
- static readonly RULE_functionName = 149;
699
- static readonly RULE_functionNameAndParams = 150;
700
- static readonly RULE_functionNameWithParams = 151;
701
- static readonly RULE_functionParam = 152;
702
- static readonly RULE_dereferenceDefinition = 153;
703
- static readonly RULE_correlationName = 154;
704
- static readonly RULE_qualifiedName = 155;
705
- static readonly RULE_timeIntervalExpression = 156;
706
- static readonly RULE_errorCapturingMultiUnitsInterval = 157;
707
- static readonly RULE_multiUnitsInterval = 158;
708
- static readonly RULE_errorCapturingUnitToUnitInterval = 159;
709
- static readonly RULE_unitToUnitInterval = 160;
710
- static readonly RULE_intervalValue = 161;
711
- static readonly RULE_tableAlias = 162;
712
- static readonly RULE_errorCapturingIdentifier = 163;
713
- static readonly RULE_errorCapturingIdentifierExtra = 164;
714
- static readonly RULE_identifierList = 165;
715
- static readonly RULE_identifierSeq = 166;
716
- static readonly RULE_identifier = 167;
717
- static readonly RULE_unquotedIdentifier = 168;
718
- static readonly RULE_quotedIdentifier = 169;
719
- static readonly RULE_whenClause = 170;
720
- static readonly RULE_catalogPath = 171;
721
- static readonly RULE_catalogPathCreate = 172;
722
- static readonly RULE_databasePath = 173;
723
- static readonly RULE_databasePathCreate = 174;
724
- static readonly RULE_tablePathCreate = 175;
725
- static readonly RULE_tablePath = 176;
726
- static readonly RULE_viewPath = 177;
727
- static readonly RULE_viewPathCreate = 178;
728
- static readonly RULE_uid = 179;
729
- static readonly RULE_uidAllowEmpty = 180;
730
- static readonly RULE_withOption = 181;
731
- static readonly RULE_ifNotExists = 182;
732
- static readonly RULE_ifExists = 183;
733
- static readonly RULE_tablePropertyList = 184;
734
- static readonly RULE_tableProperty = 185;
735
- static readonly RULE_tablePropertyKey = 186;
736
- static readonly RULE_tablePropertyValue = 187;
737
- static readonly RULE_logicalOperator = 188;
738
- static readonly RULE_comparisonOperator = 189;
739
- static readonly RULE_bitOperator = 190;
740
- static readonly RULE_mathOperator = 191;
741
- static readonly RULE_unaryOperator = 192;
742
- static readonly RULE_constant = 193;
743
- static readonly RULE_timePointLiteral = 194;
744
- static readonly RULE_stringLiteral = 195;
745
- static readonly RULE_decimalLiteral = 196;
746
- static readonly RULE_booleanLiteral = 197;
747
- static readonly RULE_setQuantifier = 198;
748
- static readonly RULE_timePointUnit = 199;
749
- static readonly RULE_timeIntervalUnit = 200;
750
- static readonly RULE_reservedKeywordsUsedAsFuncParam = 201;
751
- static readonly RULE_reservedKeywordsNoParamsUsedAsFuncName = 202;
752
- static readonly RULE_reservedKeywordsFollowParamsUsedAsFuncName = 203;
753
- static readonly RULE_reservedKeywordsUsedAsFuncName = 204;
754
- static readonly RULE_nonReservedKeywords = 205;
575
+ static readonly RULE_columnName = 26;
576
+ static readonly RULE_columnNamePath = 27;
577
+ static readonly RULE_columnNameList = 28;
578
+ static readonly RULE_columnType = 29;
579
+ static readonly RULE_lengthOneDimension = 30;
580
+ static readonly RULE_lengthTwoOptionalDimension = 31;
581
+ static readonly RULE_lengthTwoStringDimension = 32;
582
+ static readonly RULE_lengthOneTypeDimension = 33;
583
+ static readonly RULE_mapTypeDimension = 34;
584
+ static readonly RULE_rowTypeDimension = 35;
585
+ static readonly RULE_columnConstraint = 36;
586
+ static readonly RULE_metadataColumnDefinition = 37;
587
+ static readonly RULE_metadataKey = 38;
588
+ static readonly RULE_computedColumnDefinition = 39;
589
+ static readonly RULE_computedColumnExpression = 40;
590
+ static readonly RULE_watermarkDefinition = 41;
591
+ static readonly RULE_tableConstraint = 42;
592
+ static readonly RULE_constraintName = 43;
593
+ static readonly RULE_selfDefinitionClause = 44;
594
+ static readonly RULE_partitionDefinition = 45;
595
+ static readonly RULE_transformList = 46;
596
+ static readonly RULE_transform = 47;
597
+ static readonly RULE_transformArgument = 48;
598
+ static readonly RULE_likeDefinition = 49;
599
+ static readonly RULE_likeOption = 50;
600
+ static readonly RULE_createCatalog = 51;
601
+ static readonly RULE_createDatabase = 52;
602
+ static readonly RULE_createView = 53;
603
+ static readonly RULE_createFunction = 54;
604
+ static readonly RULE_usingClause = 55;
605
+ static readonly RULE_jarFileName = 56;
606
+ static readonly RULE_alterTable = 57;
607
+ static readonly RULE_renameDefinition = 58;
608
+ static readonly RULE_setKeyValueDefinition = 59;
609
+ static readonly RULE_addConstraint = 60;
610
+ static readonly RULE_dropConstraint = 61;
611
+ static readonly RULE_addUnique = 62;
612
+ static readonly RULE_notForced = 63;
613
+ static readonly RULE_alterView = 64;
614
+ static readonly RULE_alterDatabase = 65;
615
+ static readonly RULE_alterFunction = 66;
616
+ static readonly RULE_dropCatalog = 67;
617
+ static readonly RULE_dropTable = 68;
618
+ static readonly RULE_dropDatabase = 69;
619
+ static readonly RULE_dropView = 70;
620
+ static readonly RULE_dropFunction = 71;
621
+ static readonly RULE_insertStatement = 72;
622
+ static readonly RULE_insertSimpleStatement = 73;
623
+ static readonly RULE_insertPartitionDefinition = 74;
624
+ static readonly RULE_valuesDefinition = 75;
625
+ static readonly RULE_valuesRowDefinition = 76;
626
+ static readonly RULE_valueDefinition = 77;
627
+ static readonly RULE_insertMulStatementCompatibility = 78;
628
+ static readonly RULE_insertMulStatement = 79;
629
+ static readonly RULE_queryStatement = 80;
630
+ static readonly RULE_valuesClause = 81;
631
+ static readonly RULE_withClause = 82;
632
+ static readonly RULE_withItem = 83;
633
+ static readonly RULE_withItemName = 84;
634
+ static readonly RULE_selectStatement = 85;
635
+ static readonly RULE_selectClause = 86;
636
+ static readonly RULE_selectList = 87;
637
+ static readonly RULE_columnProjectItem = 88;
638
+ static readonly RULE_selectWindowItemColumnName = 89;
639
+ static readonly RULE_selectExpressionColumnName = 90;
640
+ static readonly RULE_selectLiteralColumnName = 91;
641
+ static readonly RULE_columnAlias = 92;
642
+ static readonly RULE_projectItemDefinition = 93;
643
+ static readonly RULE_tableAllColumns = 94;
644
+ static readonly RULE_overWindowItem = 95;
645
+ static readonly RULE_fromClause = 96;
646
+ static readonly RULE_tableExpression = 97;
647
+ static readonly RULE_tableReference = 98;
648
+ static readonly RULE_tablePrimary = 99;
649
+ static readonly RULE_atomFunctionTable = 100;
650
+ static readonly RULE_atomExpressionTable = 101;
651
+ static readonly RULE_systemTimePeriod = 102;
652
+ static readonly RULE_dateTimeExpression = 103;
653
+ static readonly RULE_inlineDataValueClause = 104;
654
+ static readonly RULE_windowTVFClause = 105;
655
+ static readonly RULE_windowTVFExpression = 106;
656
+ static readonly RULE_windowTVFName = 107;
657
+ static readonly RULE_windowTVFParam = 108;
658
+ static readonly RULE_timeIntervalParamName = 109;
659
+ static readonly RULE_columnDescriptor = 110;
660
+ static readonly RULE_joinCondition = 111;
661
+ static readonly RULE_whereClause = 112;
662
+ static readonly RULE_groupByClause = 113;
663
+ static readonly RULE_groupItemDefinition = 114;
664
+ static readonly RULE_groupingSets = 115;
665
+ static readonly RULE_groupingSetsNotationName = 116;
666
+ static readonly RULE_groupWindowFunction = 117;
667
+ static readonly RULE_groupWindowFunctionName = 118;
668
+ static readonly RULE_timeAttrColumn = 119;
669
+ static readonly RULE_havingClause = 120;
670
+ static readonly RULE_windowClause = 121;
671
+ static readonly RULE_namedWindow = 122;
672
+ static readonly RULE_windowSpec = 123;
673
+ static readonly RULE_matchRecognizeClause = 124;
674
+ static readonly RULE_orderByClause = 125;
675
+ static readonly RULE_orderItemDefinition = 126;
676
+ static readonly RULE_limitClause = 127;
677
+ static readonly RULE_partitionByClause = 128;
678
+ static readonly RULE_quantifiers = 129;
679
+ static readonly RULE_measuresClause = 130;
680
+ static readonly RULE_patternDefinition = 131;
681
+ static readonly RULE_patternVariable = 132;
682
+ static readonly RULE_outputMode = 133;
683
+ static readonly RULE_afterMatchStrategy = 134;
684
+ static readonly RULE_patternVariablesDefinition = 135;
685
+ static readonly RULE_windowFrame = 136;
686
+ static readonly RULE_frameBound = 137;
687
+ static readonly RULE_withinClause = 138;
688
+ static readonly RULE_expression = 139;
689
+ static readonly RULE_booleanExpression = 140;
690
+ static readonly RULE_predicate = 141;
691
+ static readonly RULE_likePredicate = 142;
692
+ static readonly RULE_valueExpression = 143;
693
+ static readonly RULE_functionCallExpression = 144;
694
+ static readonly RULE_primaryExpression = 145;
695
+ static readonly RULE_functionNameCreate = 146;
696
+ static readonly RULE_functionName = 147;
697
+ static readonly RULE_functionNameAndParams = 148;
698
+ static readonly RULE_functionNameWithParams = 149;
699
+ static readonly RULE_functionParam = 150;
700
+ static readonly RULE_dereferenceDefinition = 151;
701
+ static readonly RULE_correlationName = 152;
702
+ static readonly RULE_qualifiedName = 153;
703
+ static readonly RULE_timeIntervalExpression = 154;
704
+ static readonly RULE_errorCapturingMultiUnitsInterval = 155;
705
+ static readonly RULE_multiUnitsInterval = 156;
706
+ static readonly RULE_errorCapturingUnitToUnitInterval = 157;
707
+ static readonly RULE_unitToUnitInterval = 158;
708
+ static readonly RULE_intervalValue = 159;
709
+ static readonly RULE_tableAlias = 160;
710
+ static readonly RULE_errorCapturingIdentifier = 161;
711
+ static readonly RULE_errorCapturingIdentifierExtra = 162;
712
+ static readonly RULE_identifierList = 163;
713
+ static readonly RULE_identifierSeq = 164;
714
+ static readonly RULE_identifier = 165;
715
+ static readonly RULE_unquotedIdentifier = 166;
716
+ static readonly RULE_quotedIdentifier = 167;
717
+ static readonly RULE_whenClause = 168;
718
+ static readonly RULE_catalogPath = 169;
719
+ static readonly RULE_catalogPathCreate = 170;
720
+ static readonly RULE_databasePath = 171;
721
+ static readonly RULE_databasePathCreate = 172;
722
+ static readonly RULE_tablePathCreate = 173;
723
+ static readonly RULE_tablePath = 174;
724
+ static readonly RULE_viewPath = 175;
725
+ static readonly RULE_viewPathCreate = 176;
726
+ static readonly RULE_uid = 177;
727
+ static readonly RULE_withOption = 178;
728
+ static readonly RULE_ifNotExists = 179;
729
+ static readonly RULE_ifExists = 180;
730
+ static readonly RULE_tablePropertyList = 181;
731
+ static readonly RULE_tableProperty = 182;
732
+ static readonly RULE_tablePropertyKey = 183;
733
+ static readonly RULE_tablePropertyValue = 184;
734
+ static readonly RULE_logicalOperator = 185;
735
+ static readonly RULE_comparisonOperator = 186;
736
+ static readonly RULE_bitOperator = 187;
737
+ static readonly RULE_mathOperator = 188;
738
+ static readonly RULE_unaryOperator = 189;
739
+ static readonly RULE_constant = 190;
740
+ static readonly RULE_timePointLiteral = 191;
741
+ static readonly RULE_stringLiteral = 192;
742
+ static readonly RULE_decimalLiteral = 193;
743
+ static readonly RULE_booleanLiteral = 194;
744
+ static readonly RULE_setQuantifier = 195;
745
+ static readonly RULE_timePointUnit = 196;
746
+ static readonly RULE_timeIntervalUnit = 197;
747
+ static readonly RULE_reservedKeywordsUsedAsFuncParam = 198;
748
+ static readonly RULE_reservedKeywordsNoParamsUsedAsFuncName = 199;
749
+ static readonly RULE_reservedKeywordsFollowParamsUsedAsFuncName = 200;
750
+ static readonly RULE_reservedKeywordsUsedAsFuncName = 201;
751
+ static readonly RULE_nonReservedKeywords = 202;
755
752
  static readonly literalNames: (string | null)[];
756
753
  static readonly symbolicNames: (string | null)[];
757
754
  static readonly ruleNames: string[];
@@ -788,10 +785,8 @@ export declare class FlinkSqlParser extends SQLParserBase {
788
785
  columnOptionDefinition(): ColumnOptionDefinitionContext;
789
786
  physicalColumnDefinition(): PhysicalColumnDefinitionContext;
790
787
  columnNameCreate(): ColumnNameCreateContext;
791
- emptyColumn(): EmptyColumnContext;
792
788
  columnName(): ColumnNameContext;
793
789
  columnNamePath(): ColumnNamePathContext;
794
- columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext;
795
790
  columnNameList(): ColumnNameListContext;
796
791
  columnType(): ColumnTypeContext;
797
792
  lengthOneDimension(): LengthOneDimensionContext;
@@ -947,7 +942,6 @@ export declare class FlinkSqlParser extends SQLParserBase {
947
942
  viewPath(): ViewPathContext;
948
943
  viewPathCreate(): ViewPathCreateContext;
949
944
  uid(): UidContext;
950
- uidAllowEmpty(): UidAllowEmptyContext;
951
945
  withOption(): WithOptionContext;
952
946
  ifNotExists(): IfNotExistsContext;
953
947
  ifExists(): IfExistsContext;
@@ -975,14 +969,11 @@ export declare class FlinkSqlParser extends SQLParserBase {
975
969
  nonReservedKeywords(): NonReservedKeywordsContext;
976
970
  sempred(localContext: antlr.RuleContext | null, ruleIndex: number, predIndex: number): boolean;
977
971
  private columnName_sempred;
978
- private columnNamePathAllowEmpty_sempred;
979
972
  private queryStatement_sempred;
980
- private columnProjectItem_sempred;
981
973
  private tableExpression_sempred;
982
974
  private booleanExpression_sempred;
983
975
  private valueExpression_sempred;
984
976
  private primaryExpression_sempred;
985
- private uidAllowEmpty_sempred;
986
977
  static readonly _serializedATN: number[];
987
978
  private static __ATN;
988
979
  static get _ATN(): antlr.ATN;
@@ -1337,17 +1328,9 @@ export declare class ColumnNameCreateContext extends antlr.ParserRuleContext {
1337
1328
  exitRule(listener: FlinkSqlParserListener): void;
1338
1329
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1339
1330
  }
1340
- export declare class EmptyColumnContext extends antlr.ParserRuleContext {
1341
- constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1342
- get ruleIndex(): number;
1343
- enterRule(listener: FlinkSqlParserListener): void;
1344
- exitRule(listener: FlinkSqlParserListener): void;
1345
- accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1346
- }
1347
1331
  export declare class ColumnNameContext extends antlr.ParserRuleContext {
1348
1332
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1349
- uidAllowEmpty(): UidAllowEmptyContext | null;
1350
- emptyColumn(): EmptyColumnContext | null;
1333
+ uid(): UidContext | null;
1351
1334
  get ruleIndex(): number;
1352
1335
  enterRule(listener: FlinkSqlParserListener): void;
1353
1336
  exitRule(listener: FlinkSqlParserListener): void;
@@ -1361,15 +1344,6 @@ export declare class ColumnNamePathContext extends antlr.ParserRuleContext {
1361
1344
  exitRule(listener: FlinkSqlParserListener): void;
1362
1345
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1363
1346
  }
1364
- export declare class ColumnNamePathAllowEmptyContext extends antlr.ParserRuleContext {
1365
- constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1366
- uidAllowEmpty(): UidAllowEmptyContext | null;
1367
- emptyColumn(): EmptyColumnContext | null;
1368
- get ruleIndex(): number;
1369
- enterRule(listener: FlinkSqlParserListener): void;
1370
- exitRule(listener: FlinkSqlParserListener): void;
1371
- accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1372
- }
1373
1347
  export declare class ColumnNameListContext extends antlr.ParserRuleContext {
1374
1348
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1375
1349
  LR_BRACKET(): antlr.TerminalNode;
@@ -2175,7 +2149,6 @@ export declare class ColumnProjectItemContext extends antlr.ParserRuleContext {
2175
2149
  tableAllColumns(): TableAllColumnsContext | null;
2176
2150
  selectExpressionColumnName(): SelectExpressionColumnNameContext | null;
2177
2151
  columnName(): ColumnNameContext | null;
2178
- emptyColumn(): EmptyColumnContext | null;
2179
2152
  get ruleIndex(): number;
2180
2153
  enterRule(listener: FlinkSqlParserListener): void;
2181
2154
  exitRule(listener: FlinkSqlParserListener): void;
@@ -2441,9 +2414,6 @@ export declare class JoinConditionContext extends antlr.ParserRuleContext {
2441
2414
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2442
2415
  KW_ON(): antlr.TerminalNode | null;
2443
2416
  booleanExpression(): BooleanExpressionContext | null;
2444
- columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext[];
2445
- columnNamePathAllowEmpty(i: number): ColumnNamePathAllowEmptyContext | null;
2446
- EQUAL_SYMBOL(): antlr.TerminalNode | null;
2447
2417
  KW_USING(): antlr.TerminalNode | null;
2448
2418
  columnNameList(): ColumnNameListContext | null;
2449
2419
  get ruleIndex(): number;
@@ -2454,8 +2424,7 @@ export declare class JoinConditionContext extends antlr.ParserRuleContext {
2454
2424
  export declare class WhereClauseContext extends antlr.ParserRuleContext {
2455
2425
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2456
2426
  KW_WHERE(): antlr.TerminalNode;
2457
- booleanExpression(): BooleanExpressionContext | null;
2458
- columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext | null;
2427
+ booleanExpression(): BooleanExpressionContext;
2459
2428
  get ruleIndex(): number;
2460
2429
  enterRule(listener: FlinkSqlParserListener): void;
2461
2430
  exitRule(listener: FlinkSqlParserListener): void;
@@ -3493,18 +3462,6 @@ export declare class UidContext extends antlr.ParserRuleContext {
3493
3462
  exitRule(listener: FlinkSqlParserListener): void;
3494
3463
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
3495
3464
  }
3496
- export declare class UidAllowEmptyContext extends antlr.ParserRuleContext {
3497
- constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3498
- identifier(): IdentifierContext[];
3499
- identifier(i: number): IdentifierContext | null;
3500
- DOT(): antlr.TerminalNode[];
3501
- DOT(i: number): antlr.TerminalNode | null;
3502
- emptyColumn(): EmptyColumnContext | null;
3503
- get ruleIndex(): number;
3504
- enterRule(listener: FlinkSqlParserListener): void;
3505
- exitRule(listener: FlinkSqlParserListener): void;
3506
- accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
3507
- }
3508
3465
  export declare class WithOptionContext extends antlr.ParserRuleContext {
3509
3466
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3510
3467
  KW_WITH(): antlr.TerminalNode;