dt-sql-parser 4.0.1 → 4.1.0-beta.0

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 (88) hide show
  1. package/README.md +6 -1
  2. package/dist/lib/flink/FlinkSqlLexer.js +1 -2
  3. package/dist/lib/flink/FlinkSqlParser.d.ts +175 -174
  4. package/dist/lib/flink/FlinkSqlParser.js +2315 -2388
  5. package/dist/lib/flink/FlinkSqlParserListener.d.ts +5 -16
  6. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +3 -10
  7. package/dist/lib/hive/HiveSqlLexer.js +1 -2
  8. package/dist/lib/hive/HiveSqlParser.d.ts +3 -1
  9. package/dist/lib/hive/HiveSqlParser.js +8 -9
  10. package/dist/lib/impala/ImpalaSqlLexer.js +1 -2
  11. package/dist/lib/impala/ImpalaSqlParser.d.ts +123 -107
  12. package/dist/lib/impala/ImpalaSqlParser.js +3223 -3155
  13. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
  14. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
  15. package/dist/lib/mysql/MySqlLexer.js +1 -2
  16. package/dist/lib/mysql/MySqlParser.d.ts +469 -422
  17. package/dist/lib/mysql/MySqlParser.js +11463 -10512
  18. package/dist/lib/mysql/MySqlParserListener.d.ts +42 -20
  19. package/dist/lib/mysql/MySqlParserVisitor.d.ts +26 -12
  20. package/dist/lib/postgresql/PostgreSqlLexer.js +1 -2
  21. package/dist/lib/postgresql/PostgreSqlParser.d.ts +2025 -6265
  22. package/dist/lib/postgresql/PostgreSqlParser.js +60092 -88368
  23. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +1688 -6083
  24. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +712 -3511
  25. package/dist/lib/spark/SparkSqlLexer.js +1 -2
  26. package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
  27. package/dist/lib/spark/SparkSqlParser.js +50 -51
  28. package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
  29. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
  30. package/dist/lib/trino/TrinoSqlLexer.d.ts +323 -260
  31. package/dist/lib/trino/TrinoSqlLexer.js +1610 -1264
  32. package/dist/lib/trino/TrinoSqlListener.d.ts +1311 -200
  33. package/dist/lib/trino/TrinoSqlParser.d.ts +1908 -562
  34. package/dist/lib/trino/TrinoSqlParser.js +22629 -13412
  35. package/dist/lib/trino/TrinoSqlVisitor.d.ts +761 -69
  36. package/dist/locale/locale.d.ts +41 -0
  37. package/dist/locale/locale.js +43 -0
  38. package/dist/parser/common/basicSQL.d.ts +7 -2
  39. package/dist/parser/common/basicSQL.js +5 -15
  40. package/dist/parser/common/entityCollector.d.ts +60 -12
  41. package/dist/parser/common/entityCollector.js +141 -17
  42. package/dist/parser/common/parseErrorListener.d.ts +6 -3
  43. package/dist/parser/common/parseErrorListener.js +83 -2
  44. package/dist/parser/common/textAndWord.d.ts +6 -9
  45. package/dist/parser/common/textAndWord.js +9 -20
  46. package/dist/parser/common/transform.d.ts +8 -0
  47. package/dist/parser/common/transform.js +11 -0
  48. package/dist/parser/common/types.d.ts +1 -0
  49. package/dist/parser/flink/flinkEntityCollector.js +40 -6
  50. package/dist/parser/flink/flinkErrorListener.d.ts +9 -0
  51. package/dist/parser/flink/flinkErrorListener.js +67 -0
  52. package/dist/parser/flink/index.d.ts +3 -0
  53. package/dist/parser/flink/index.js +13 -9
  54. package/dist/parser/hive/hiveEntityCollector.js +40 -6
  55. package/dist/parser/hive/hiveErrorListener.d.ts +9 -0
  56. package/dist/parser/hive/hiveErrorListener.js +65 -0
  57. package/dist/parser/hive/index.d.ts +3 -0
  58. package/dist/parser/hive/index.js +13 -9
  59. package/dist/parser/impala/ImpalaErrorListener.d.ts +9 -0
  60. package/dist/parser/impala/ImpalaErrorListener.js +63 -0
  61. package/dist/parser/impala/impalaEntityCollector.js +51 -6
  62. package/dist/parser/impala/index.d.ts +3 -0
  63. package/dist/parser/impala/index.js +4 -0
  64. package/dist/parser/mysql/index.d.ts +3 -0
  65. package/dist/parser/mysql/index.js +4 -0
  66. package/dist/parser/mysql/mysqlEntityCollector.d.ts +3 -1
  67. package/dist/parser/mysql/mysqlEntityCollector.js +40 -5
  68. package/dist/parser/mysql/mysqlErrorListener.d.ts +9 -0
  69. package/dist/parser/mysql/mysqlErrorListener.js +63 -0
  70. package/dist/parser/postgresql/index.d.ts +3 -0
  71. package/dist/parser/postgresql/index.js +17 -13
  72. package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -1
  73. package/dist/parser/postgresql/postgreEntityCollector.js +44 -4
  74. package/dist/parser/postgresql/postgreErrorListener.d.ts +9 -0
  75. package/dist/parser/postgresql/postgreErrorListener.js +71 -0
  76. package/dist/parser/spark/index.d.ts +3 -0
  77. package/dist/parser/spark/index.js +4 -0
  78. package/dist/parser/spark/sparkEntityCollector.d.ts +1 -1
  79. package/dist/parser/spark/sparkEntityCollector.js +43 -6
  80. package/dist/parser/spark/sparkErrorListener.d.ts +9 -0
  81. package/dist/parser/spark/sparkErrorListener.js +63 -0
  82. package/dist/parser/trino/index.d.ts +3 -0
  83. package/dist/parser/trino/index.js +23 -10
  84. package/dist/parser/trino/trinoEntityCollector.d.ts +6 -4
  85. package/dist/parser/trino/trinoEntityCollector.js +44 -9
  86. package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
  87. package/dist/parser/trino/trinoErrorListener.js +65 -0
  88. package/package.json +40 -12
package/README.md CHANGED
@@ -27,7 +27,8 @@ Additionally, it provides advanced features such as **SQL Validation**, **Code C
27
27
  - Trino
28
28
  - Impala
29
29
 
30
- >Tips: This project is the default for Typescript target, also you can try to compile it to other languages if you need.
30
+ >[!TIP]
31
+ >This project is the default for Typescript target, also you can try to compile it to other languages if you need.
31
32
 
32
33
  <br/>
33
34
 
@@ -435,6 +436,10 @@ For the editor, this strategy is also more intuitive. After the user enters `SHO
435
436
 
436
437
  <br/>
437
438
 
439
+ ## Contributing
440
+
441
+ Refer to [CONTRIBUTING](./CONTRIBUTING.md)
442
+
438
443
  ## License
439
444
 
440
445
  [MIT](./LICENSE)
@@ -1,7 +1,7 @@
1
1
  // Generated from dt-sql-parser/src/grammar/flink/FlinkSqlLexer.g4 by ANTLR 4.13.1
2
2
  // @ts-nocheck
3
3
  import * as antlr from "antlr4ng";
4
- class FlinkSqlLexer extends antlr.Lexer {
4
+ export class FlinkSqlLexer extends antlr.Lexer {
5
5
  constructor(input) {
6
6
  super(input);
7
7
  this.interpreter = new antlr.LexerATNSimulator(this, FlinkSqlLexer._ATN, FlinkSqlLexer.decisionsToDFA, new antlr.PredictionContextCache());
@@ -2962,4 +2962,3 @@ FlinkSqlLexer._serializedATN = [
2962
2962
  ];
2963
2963
  FlinkSqlLexer.vocabulary = new antlr.Vocabulary(FlinkSqlLexer.literalNames, FlinkSqlLexer.symbolicNames, []);
2964
2964
  FlinkSqlLexer.decisionsToDFA = FlinkSqlLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
2965
- export { FlinkSqlLexer };
@@ -581,158 +581,157 @@ export declare class FlinkSqlParser extends SQLParserBase {
581
581
  static readonly RULE_mapTypeDimension = 33;
582
582
  static readonly RULE_rowTypeDimension = 34;
583
583
  static readonly RULE_columnConstraint = 35;
584
- static readonly RULE_commentSpec = 36;
585
- static readonly RULE_metadataColumnDefinition = 37;
586
- static readonly RULE_metadataKey = 38;
587
- static readonly RULE_computedColumnDefinition = 39;
588
- static readonly RULE_computedColumnExpression = 40;
589
- static readonly RULE_watermarkDefinition = 41;
590
- static readonly RULE_tableConstraint = 42;
591
- static readonly RULE_constraintName = 43;
592
- static readonly RULE_selfDefinitionClause = 44;
593
- static readonly RULE_partitionDefinition = 45;
594
- static readonly RULE_transformList = 46;
595
- static readonly RULE_transform = 47;
596
- static readonly RULE_transformArgument = 48;
597
- static readonly RULE_likeDefinition = 49;
598
- static readonly RULE_likeOption = 50;
599
- static readonly RULE_createCatalog = 51;
600
- static readonly RULE_createDatabase = 52;
601
- static readonly RULE_createView = 53;
602
- static readonly RULE_createFunction = 54;
603
- static readonly RULE_usingClause = 55;
604
- static readonly RULE_jarFileName = 56;
605
- static readonly RULE_alterTable = 57;
606
- static readonly RULE_renameDefinition = 58;
607
- static readonly RULE_setKeyValueDefinition = 59;
608
- static readonly RULE_addConstraint = 60;
609
- static readonly RULE_dropConstraint = 61;
610
- static readonly RULE_addUnique = 62;
611
- static readonly RULE_notForced = 63;
612
- static readonly RULE_alertView = 64;
613
- static readonly RULE_alterDatabase = 65;
614
- static readonly RULE_alterFunction = 66;
615
- static readonly RULE_dropCatalog = 67;
616
- static readonly RULE_dropTable = 68;
617
- static readonly RULE_dropDatabase = 69;
618
- static readonly RULE_dropView = 70;
619
- static readonly RULE_dropFunction = 71;
620
- static readonly RULE_insertStatement = 72;
621
- static readonly RULE_insertSimpleStatement = 73;
622
- static readonly RULE_insertPartitionDefinition = 74;
623
- static readonly RULE_valuesDefinition = 75;
624
- static readonly RULE_valuesRowDefinition = 76;
625
- static readonly RULE_insertMulStatementCompatibility = 77;
626
- static readonly RULE_insertMulStatement = 78;
627
- static readonly RULE_queryStatement = 79;
628
- static readonly RULE_valuesCaluse = 80;
629
- static readonly RULE_withClause = 81;
630
- static readonly RULE_withItem = 82;
631
- static readonly RULE_withItemName = 83;
632
- static readonly RULE_selectStatement = 84;
633
- static readonly RULE_selectClause = 85;
634
- static readonly RULE_projectItemDefinition = 86;
635
- static readonly RULE_overWindowItem = 87;
636
- static readonly RULE_fromClause = 88;
637
- static readonly RULE_tableExpression = 89;
638
- static readonly RULE_tableReference = 90;
639
- static readonly RULE_tablePrimary = 91;
640
- static readonly RULE_systemTimePeriod = 92;
641
- static readonly RULE_dateTimeExpression = 93;
642
- static readonly RULE_inlineDataValueClause = 94;
643
- static readonly RULE_windoTVFClause = 95;
644
- static readonly RULE_windowTVFExression = 96;
645
- static readonly RULE_windoTVFName = 97;
646
- static readonly RULE_windowTVFParam = 98;
647
- static readonly RULE_timeIntervalParamName = 99;
648
- static readonly RULE_columnDescriptor = 100;
649
- static readonly RULE_joinCondition = 101;
650
- static readonly RULE_whereClause = 102;
651
- static readonly RULE_groupByClause = 103;
652
- static readonly RULE_groupItemDefinition = 104;
653
- static readonly RULE_groupingSets = 105;
654
- static readonly RULE_groupingSetsNotaionName = 106;
655
- static readonly RULE_groupWindowFunction = 107;
656
- static readonly RULE_groupWindowFunctionName = 108;
657
- static readonly RULE_timeAttrColumn = 109;
658
- static readonly RULE_havingClause = 110;
659
- static readonly RULE_windowClause = 111;
660
- static readonly RULE_namedWindow = 112;
661
- static readonly RULE_windowSpec = 113;
662
- static readonly RULE_matchRecognizeClause = 114;
663
- static readonly RULE_orderByCaluse = 115;
664
- static readonly RULE_orderItemDefition = 116;
665
- static readonly RULE_limitClause = 117;
666
- static readonly RULE_partitionByClause = 118;
667
- static readonly RULE_quantifiers = 119;
668
- static readonly RULE_measuresClause = 120;
669
- static readonly RULE_patternDefination = 121;
670
- static readonly RULE_patternVariable = 122;
671
- static readonly RULE_outputMode = 123;
672
- static readonly RULE_afterMatchStrategy = 124;
673
- static readonly RULE_patternVariablesDefination = 125;
674
- static readonly RULE_windowFrame = 126;
675
- static readonly RULE_frameBound = 127;
676
- static readonly RULE_withinClause = 128;
677
- static readonly RULE_expression = 129;
678
- static readonly RULE_booleanExpression = 130;
679
- static readonly RULE_predicate = 131;
680
- static readonly RULE_likePredicate = 132;
681
- static readonly RULE_valueExpression = 133;
682
- static readonly RULE_primaryExpression = 134;
683
- static readonly RULE_functionNameCreate = 135;
684
- static readonly RULE_functionName = 136;
685
- static readonly RULE_functionParam = 137;
686
- static readonly RULE_dereferenceDefinition = 138;
687
- static readonly RULE_correlationName = 139;
688
- static readonly RULE_qualifiedName = 140;
689
- static readonly RULE_timeIntervalExpression = 141;
690
- static readonly RULE_errorCapturingMultiUnitsInterval = 142;
691
- static readonly RULE_multiUnitsInterval = 143;
692
- static readonly RULE_errorCapturingUnitToUnitInterval = 144;
693
- static readonly RULE_unitToUnitInterval = 145;
694
- static readonly RULE_intervalValue = 146;
695
- static readonly RULE_tableAlias = 147;
696
- static readonly RULE_errorCapturingIdentifier = 148;
697
- static readonly RULE_errorCapturingIdentifierExtra = 149;
698
- static readonly RULE_identifierList = 150;
699
- static readonly RULE_identifierSeq = 151;
700
- static readonly RULE_identifier = 152;
701
- static readonly RULE_unquotedIdentifier = 153;
702
- static readonly RULE_quotedIdentifier = 154;
703
- static readonly RULE_whenClause = 155;
704
- static readonly RULE_catalogPath = 156;
705
- static readonly RULE_catalogPathCreate = 157;
706
- static readonly RULE_databasePath = 158;
707
- static readonly RULE_databasePathCreate = 159;
708
- static readonly RULE_tablePathCreate = 160;
709
- static readonly RULE_tablePath = 161;
710
- static readonly RULE_viewPath = 162;
711
- static readonly RULE_viewPathCreate = 163;
712
- static readonly RULE_uid = 164;
713
- static readonly RULE_withOption = 165;
714
- static readonly RULE_ifNotExists = 166;
715
- static readonly RULE_ifExists = 167;
716
- static readonly RULE_tablePropertyList = 168;
717
- static readonly RULE_tableProperty = 169;
718
- static readonly RULE_tablePropertyKey = 170;
719
- static readonly RULE_tablePropertyValue = 171;
720
- static readonly RULE_logicalOperator = 172;
721
- static readonly RULE_comparisonOperator = 173;
722
- static readonly RULE_bitOperator = 174;
723
- static readonly RULE_mathOperator = 175;
724
- static readonly RULE_unaryOperator = 176;
725
- static readonly RULE_constant = 177;
726
- static readonly RULE_timePointLiteral = 178;
727
- static readonly RULE_stringLiteral = 179;
728
- static readonly RULE_decimalLiteral = 180;
729
- static readonly RULE_booleanLiteral = 181;
730
- static readonly RULE_setQuantifier = 182;
731
- static readonly RULE_timePointUnit = 183;
732
- static readonly RULE_timeIntervalUnit = 184;
733
- static readonly RULE_reservedKeywordsUsedAsFuncParam = 185;
734
- static readonly RULE_reservedKeywordsUsedAsFuncName = 186;
735
- static readonly RULE_nonReservedKeywords = 187;
584
+ static readonly RULE_metadataColumnDefinition = 36;
585
+ static readonly RULE_metadataKey = 37;
586
+ static readonly RULE_computedColumnDefinition = 38;
587
+ static readonly RULE_computedColumnExpression = 39;
588
+ static readonly RULE_watermarkDefinition = 40;
589
+ static readonly RULE_tableConstraint = 41;
590
+ static readonly RULE_constraintName = 42;
591
+ static readonly RULE_selfDefinitionClause = 43;
592
+ static readonly RULE_partitionDefinition = 44;
593
+ static readonly RULE_transformList = 45;
594
+ static readonly RULE_transform = 46;
595
+ static readonly RULE_transformArgument = 47;
596
+ static readonly RULE_likeDefinition = 48;
597
+ static readonly RULE_likeOption = 49;
598
+ static readonly RULE_createCatalog = 50;
599
+ static readonly RULE_createDatabase = 51;
600
+ static readonly RULE_createView = 52;
601
+ static readonly RULE_createFunction = 53;
602
+ static readonly RULE_usingClause = 54;
603
+ static readonly RULE_jarFileName = 55;
604
+ static readonly RULE_alterTable = 56;
605
+ static readonly RULE_renameDefinition = 57;
606
+ static readonly RULE_setKeyValueDefinition = 58;
607
+ static readonly RULE_addConstraint = 59;
608
+ static readonly RULE_dropConstraint = 60;
609
+ static readonly RULE_addUnique = 61;
610
+ static readonly RULE_notForced = 62;
611
+ static readonly RULE_alterView = 63;
612
+ static readonly RULE_alterDatabase = 64;
613
+ static readonly RULE_alterFunction = 65;
614
+ static readonly RULE_dropCatalog = 66;
615
+ static readonly RULE_dropTable = 67;
616
+ static readonly RULE_dropDatabase = 68;
617
+ static readonly RULE_dropView = 69;
618
+ static readonly RULE_dropFunction = 70;
619
+ static readonly RULE_insertStatement = 71;
620
+ static readonly RULE_insertSimpleStatement = 72;
621
+ static readonly RULE_insertPartitionDefinition = 73;
622
+ static readonly RULE_valuesDefinition = 74;
623
+ static readonly RULE_valuesRowDefinition = 75;
624
+ static readonly RULE_insertMulStatementCompatibility = 76;
625
+ static readonly RULE_insertMulStatement = 77;
626
+ static readonly RULE_queryStatement = 78;
627
+ static readonly RULE_valuesCaluse = 79;
628
+ static readonly RULE_withClause = 80;
629
+ static readonly RULE_withItem = 81;
630
+ static readonly RULE_withItemName = 82;
631
+ static readonly RULE_selectStatement = 83;
632
+ static readonly RULE_selectClause = 84;
633
+ static readonly RULE_projectItemDefinition = 85;
634
+ static readonly RULE_overWindowItem = 86;
635
+ static readonly RULE_fromClause = 87;
636
+ static readonly RULE_tableExpression = 88;
637
+ static readonly RULE_tableReference = 89;
638
+ static readonly RULE_tablePrimary = 90;
639
+ static readonly RULE_systemTimePeriod = 91;
640
+ static readonly RULE_dateTimeExpression = 92;
641
+ static readonly RULE_inlineDataValueClause = 93;
642
+ static readonly RULE_windoTVFClause = 94;
643
+ static readonly RULE_windowTVFExression = 95;
644
+ static readonly RULE_windoTVFName = 96;
645
+ static readonly RULE_windowTVFParam = 97;
646
+ static readonly RULE_timeIntervalParamName = 98;
647
+ static readonly RULE_columnDescriptor = 99;
648
+ static readonly RULE_joinCondition = 100;
649
+ static readonly RULE_whereClause = 101;
650
+ static readonly RULE_groupByClause = 102;
651
+ static readonly RULE_groupItemDefinition = 103;
652
+ static readonly RULE_groupingSets = 104;
653
+ static readonly RULE_groupingSetsNotaionName = 105;
654
+ static readonly RULE_groupWindowFunction = 106;
655
+ static readonly RULE_groupWindowFunctionName = 107;
656
+ static readonly RULE_timeAttrColumn = 108;
657
+ static readonly RULE_havingClause = 109;
658
+ static readonly RULE_windowClause = 110;
659
+ static readonly RULE_namedWindow = 111;
660
+ static readonly RULE_windowSpec = 112;
661
+ static readonly RULE_matchRecognizeClause = 113;
662
+ static readonly RULE_orderByCaluse = 114;
663
+ static readonly RULE_orderItemDefition = 115;
664
+ static readonly RULE_limitClause = 116;
665
+ static readonly RULE_partitionByClause = 117;
666
+ static readonly RULE_quantifiers = 118;
667
+ static readonly RULE_measuresClause = 119;
668
+ static readonly RULE_patternDefination = 120;
669
+ static readonly RULE_patternVariable = 121;
670
+ static readonly RULE_outputMode = 122;
671
+ static readonly RULE_afterMatchStrategy = 123;
672
+ static readonly RULE_patternVariablesDefination = 124;
673
+ static readonly RULE_windowFrame = 125;
674
+ static readonly RULE_frameBound = 126;
675
+ static readonly RULE_withinClause = 127;
676
+ static readonly RULE_expression = 128;
677
+ static readonly RULE_booleanExpression = 129;
678
+ static readonly RULE_predicate = 130;
679
+ static readonly RULE_likePredicate = 131;
680
+ static readonly RULE_valueExpression = 132;
681
+ static readonly RULE_primaryExpression = 133;
682
+ static readonly RULE_functionNameCreate = 134;
683
+ static readonly RULE_functionName = 135;
684
+ static readonly RULE_functionParam = 136;
685
+ static readonly RULE_dereferenceDefinition = 137;
686
+ static readonly RULE_correlationName = 138;
687
+ static readonly RULE_qualifiedName = 139;
688
+ static readonly RULE_timeIntervalExpression = 140;
689
+ static readonly RULE_errorCapturingMultiUnitsInterval = 141;
690
+ static readonly RULE_multiUnitsInterval = 142;
691
+ static readonly RULE_errorCapturingUnitToUnitInterval = 143;
692
+ static readonly RULE_unitToUnitInterval = 144;
693
+ static readonly RULE_intervalValue = 145;
694
+ static readonly RULE_tableAlias = 146;
695
+ static readonly RULE_errorCapturingIdentifier = 147;
696
+ static readonly RULE_errorCapturingIdentifierExtra = 148;
697
+ static readonly RULE_identifierList = 149;
698
+ static readonly RULE_identifierSeq = 150;
699
+ static readonly RULE_identifier = 151;
700
+ static readonly RULE_unquotedIdentifier = 152;
701
+ static readonly RULE_quotedIdentifier = 153;
702
+ static readonly RULE_whenClause = 154;
703
+ static readonly RULE_catalogPath = 155;
704
+ static readonly RULE_catalogPathCreate = 156;
705
+ static readonly RULE_databasePath = 157;
706
+ static readonly RULE_databasePathCreate = 158;
707
+ static readonly RULE_tablePathCreate = 159;
708
+ static readonly RULE_tablePath = 160;
709
+ static readonly RULE_viewPath = 161;
710
+ static readonly RULE_viewPathCreate = 162;
711
+ static readonly RULE_uid = 163;
712
+ static readonly RULE_withOption = 164;
713
+ static readonly RULE_ifNotExists = 165;
714
+ static readonly RULE_ifExists = 166;
715
+ static readonly RULE_tablePropertyList = 167;
716
+ static readonly RULE_tableProperty = 168;
717
+ static readonly RULE_tablePropertyKey = 169;
718
+ static readonly RULE_tablePropertyValue = 170;
719
+ static readonly RULE_logicalOperator = 171;
720
+ static readonly RULE_comparisonOperator = 172;
721
+ static readonly RULE_bitOperator = 173;
722
+ static readonly RULE_mathOperator = 174;
723
+ static readonly RULE_unaryOperator = 175;
724
+ static readonly RULE_constant = 176;
725
+ static readonly RULE_timePointLiteral = 177;
726
+ static readonly RULE_stringLiteral = 178;
727
+ static readonly RULE_decimalLiteral = 179;
728
+ static readonly RULE_booleanLiteral = 180;
729
+ static readonly RULE_setQuantifier = 181;
730
+ static readonly RULE_timePointUnit = 182;
731
+ static readonly RULE_timeIntervalUnit = 183;
732
+ static readonly RULE_reservedKeywordsUsedAsFuncParam = 184;
733
+ static readonly RULE_reservedKeywordsUsedAsFuncName = 185;
734
+ static readonly RULE_nonReservedKeywords = 186;
736
735
  static readonly literalNames: (string | null)[];
737
736
  static readonly symbolicNames: (string | null)[];
738
737
  static readonly ruleNames: string[];
@@ -779,7 +778,6 @@ export declare class FlinkSqlParser extends SQLParserBase {
779
778
  mapTypeDimension(): MapTypeDimensionContext;
780
779
  rowTypeDimension(): RowTypeDimensionContext;
781
780
  columnConstraint(): ColumnConstraintContext;
782
- commentSpec(): CommentSpecContext;
783
781
  metadataColumnDefinition(): MetadataColumnDefinitionContext;
784
782
  metadataKey(): MetadataKeyContext;
785
783
  computedColumnDefinition(): ComputedColumnDefinitionContext;
@@ -807,7 +805,7 @@ export declare class FlinkSqlParser extends SQLParserBase {
807
805
  dropConstraint(): DropConstraintContext;
808
806
  addUnique(): AddUniqueContext;
809
807
  notForced(): NotForcedContext;
810
- alertView(): AlertViewContext;
808
+ alterView(): AlterViewContext;
811
809
  alterDatabase(): AlterDatabaseContext;
812
810
  alterFunction(): AlterFunctionContext;
813
811
  dropCatalog(): DropCatalogContext;
@@ -1005,7 +1003,7 @@ export declare class DdlStatementContext extends antlr.ParserRuleContext {
1005
1003
  createFunction(): CreateFunctionContext | null;
1006
1004
  createCatalog(): CreateCatalogContext | null;
1007
1005
  alterTable(): AlterTableContext | null;
1008
- alertView(): AlertViewContext | null;
1006
+ alterView(): AlterViewContext | null;
1009
1007
  alterDatabase(): AlterDatabaseContext | null;
1010
1008
  alterFunction(): AlterFunctionContext | null;
1011
1009
  dropCatalog(): DropCatalogContext | null;
@@ -1225,6 +1223,7 @@ export declare class CreateTableContext extends antlr.ParserRuleContext {
1225
1223
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1226
1224
  }
1227
1225
  export declare class SimpleCreateTableContext extends antlr.ParserRuleContext {
1226
+ _comment?: Token | null;
1228
1227
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1229
1228
  KW_CREATE(): antlr.TerminalNode;
1230
1229
  KW_TABLE(): antlr.TerminalNode;
@@ -1241,9 +1240,10 @@ export declare class SimpleCreateTableContext extends antlr.ParserRuleContext {
1241
1240
  watermarkDefinition(): WatermarkDefinitionContext | null;
1242
1241
  tableConstraint(): TableConstraintContext | null;
1243
1242
  selfDefinitionClause(): SelfDefinitionClauseContext | null;
1244
- commentSpec(): CommentSpecContext | null;
1243
+ KW_COMMENT(): antlr.TerminalNode | null;
1245
1244
  partitionDefinition(): PartitionDefinitionContext | null;
1246
1245
  likeDefinition(): LikeDefinitionContext | null;
1246
+ STRING_LITERAL(): antlr.TerminalNode | null;
1247
1247
  get ruleIndex(): number;
1248
1248
  enterRule(listener: FlinkSqlParserListener): void;
1249
1249
  exitRule(listener: FlinkSqlParserListener): void;
@@ -1274,11 +1274,13 @@ export declare class ColumnOptionDefinitionContext extends antlr.ParserRuleConte
1274
1274
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1275
1275
  }
1276
1276
  export declare class PhysicalColumnDefinitionContext extends antlr.ParserRuleContext {
1277
+ _comment?: Token | null;
1277
1278
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1278
1279
  columnNameCreate(): ColumnNameCreateContext;
1279
1280
  columnType(): ColumnTypeContext;
1280
1281
  columnConstraint(): ColumnConstraintContext | null;
1281
- commentSpec(): CommentSpecContext | null;
1282
+ KW_COMMENT(): antlr.TerminalNode | null;
1283
+ STRING_LITERAL(): antlr.TerminalNode | null;
1282
1284
  get ruleIndex(): number;
1283
1285
  enterRule(listener: FlinkSqlParserListener): void;
1284
1286
  exitRule(listener: FlinkSqlParserListener): void;
@@ -1315,8 +1317,7 @@ export declare class ColumnNameListContext extends antlr.ParserRuleContext {
1315
1317
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1316
1318
  }
1317
1319
  export declare class ColumnTypeContext extends antlr.ParserRuleContext {
1318
- _typeName?: Token | null;
1319
- _type_?: Token | null;
1320
+ _colType?: Token | null;
1320
1321
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1321
1322
  KW_DATE(): antlr.TerminalNode | null;
1322
1323
  KW_BOOLEAN(): antlr.TerminalNode | null;
@@ -1446,15 +1447,6 @@ export declare class ColumnConstraintContext extends antlr.ParserRuleContext {
1446
1447
  exitRule(listener: FlinkSqlParserListener): void;
1447
1448
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1448
1449
  }
1449
- export declare class CommentSpecContext extends antlr.ParserRuleContext {
1450
- constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1451
- KW_COMMENT(): antlr.TerminalNode;
1452
- STRING_LITERAL(): antlr.TerminalNode;
1453
- get ruleIndex(): number;
1454
- enterRule(listener: FlinkSqlParserListener): void;
1455
- exitRule(listener: FlinkSqlParserListener): void;
1456
- accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1457
- }
1458
1450
  export declare class MetadataColumnDefinitionContext extends antlr.ParserRuleContext {
1459
1451
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1460
1452
  columnNameCreate(): ColumnNameCreateContext;
@@ -1477,11 +1469,13 @@ export declare class MetadataKeyContext extends antlr.ParserRuleContext {
1477
1469
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1478
1470
  }
1479
1471
  export declare class ComputedColumnDefinitionContext extends antlr.ParserRuleContext {
1472
+ _comment?: Token | null;
1480
1473
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1481
1474
  columnNameCreate(): ColumnNameCreateContext;
1482
1475
  KW_AS(): antlr.TerminalNode;
1483
1476
  computedColumnExpression(): ComputedColumnExpressionContext;
1484
- commentSpec(): CommentSpecContext | null;
1477
+ KW_COMMENT(): antlr.TerminalNode | null;
1478
+ STRING_LITERAL(): antlr.TerminalNode | null;
1485
1479
  get ruleIndex(): number;
1486
1480
  enterRule(listener: FlinkSqlParserListener): void;
1487
1481
  exitRule(listener: FlinkSqlParserListener): void;
@@ -1636,19 +1630,22 @@ export declare class CreateCatalogContext extends antlr.ParserRuleContext {
1636
1630
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1637
1631
  }
1638
1632
  export declare class CreateDatabaseContext extends antlr.ParserRuleContext {
1633
+ _comment?: Token | null;
1639
1634
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1640
1635
  KW_CREATE(): antlr.TerminalNode;
1641
1636
  KW_DATABASE(): antlr.TerminalNode;
1642
1637
  databasePathCreate(): DatabasePathCreateContext;
1643
1638
  withOption(): WithOptionContext;
1644
1639
  ifNotExists(): IfNotExistsContext | null;
1645
- commentSpec(): CommentSpecContext | null;
1640
+ KW_COMMENT(): antlr.TerminalNode | null;
1641
+ STRING_LITERAL(): antlr.TerminalNode | null;
1646
1642
  get ruleIndex(): number;
1647
1643
  enterRule(listener: FlinkSqlParserListener): void;
1648
1644
  exitRule(listener: FlinkSqlParserListener): void;
1649
1645
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1650
1646
  }
1651
1647
  export declare class CreateViewContext extends antlr.ParserRuleContext {
1648
+ _comment?: Token | null;
1652
1649
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1653
1650
  KW_CREATE(): antlr.TerminalNode;
1654
1651
  KW_VIEW(): antlr.TerminalNode;
@@ -1658,7 +1655,8 @@ export declare class CreateViewContext extends antlr.ParserRuleContext {
1658
1655
  KW_TEMPORARY(): antlr.TerminalNode | null;
1659
1656
  ifNotExists(): IfNotExistsContext | null;
1660
1657
  columnNameList(): ColumnNameListContext | null;
1661
- commentSpec(): CommentSpecContext | null;
1658
+ KW_COMMENT(): antlr.TerminalNode | null;
1659
+ STRING_LITERAL(): antlr.TerminalNode | null;
1662
1660
  get ruleIndex(): number;
1663
1661
  enterRule(listener: FlinkSqlParserListener): void;
1664
1662
  exitRule(listener: FlinkSqlParserListener): void;
@@ -1785,7 +1783,7 @@ export declare class NotForcedContext extends antlr.ParserRuleContext {
1785
1783
  exitRule(listener: FlinkSqlParserListener): void;
1786
1784
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
1787
1785
  }
1788
- export declare class AlertViewContext extends antlr.ParserRuleContext {
1786
+ export declare class AlterViewContext extends antlr.ParserRuleContext {
1789
1787
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
1790
1788
  KW_ALTER(): antlr.TerminalNode;
1791
1789
  KW_VIEW(): antlr.TerminalNode;
@@ -2153,8 +2151,6 @@ export declare class TablePrimaryContext extends antlr.ParserRuleContext {
2153
2151
  tablePath(): TablePathContext | null;
2154
2152
  KW_TABLE(): antlr.TerminalNode | null;
2155
2153
  systemTimePeriod(): SystemTimePeriodContext | null;
2156
- correlationName(): CorrelationNameContext | null;
2157
- KW_AS(): antlr.TerminalNode | null;
2158
2154
  viewPath(): ViewPathContext | null;
2159
2155
  KW_LATERAL(): antlr.TerminalNode | null;
2160
2156
  LR_BRACKET(): antlr.TerminalNode[];
@@ -3093,6 +3089,7 @@ export declare class IntervalValueContext extends antlr.ParserRuleContext {
3093
3089
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
3094
3090
  }
3095
3091
  export declare class TableAliasContext extends antlr.ParserRuleContext {
3092
+ _alias?: IdentifierContext;
3096
3093
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3097
3094
  identifier(): IdentifierContext;
3098
3095
  KW_AS(): antlr.TerminalNode | null;
@@ -3550,6 +3547,10 @@ export declare class ReservedKeywordsUsedAsFuncParamContext extends antlr.Parser
3550
3547
  KW_ALL(): antlr.TerminalNode | null;
3551
3548
  KW_BOTH(): antlr.TerminalNode | null;
3552
3549
  KW_CURRENT_TIMESTAMP(): antlr.TerminalNode | null;
3550
+ KW_CURRENT_DATE(): antlr.TerminalNode | null;
3551
+ KW_CURRENT_TIME(): antlr.TerminalNode | null;
3552
+ KW_LOCALTIME(): antlr.TerminalNode | null;
3553
+ KW_LOCALTIMESTAMP(): antlr.TerminalNode | null;
3553
3554
  KW_DISTINCT(): antlr.TerminalNode | null;
3554
3555
  KW_LEADING(): antlr.TerminalNode | null;
3555
3556
  KW_TRAILING(): antlr.TerminalNode | null;