dt-sql-parser 4.0.2 → 4.0.3-beta.1
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.
- package/README.md +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/flink/FlinkSqlLexer.js +1 -2
- package/dist/lib/flink/FlinkSqlParser.d.ts +181 -176
- package/dist/lib/flink/FlinkSqlParser.js +2411 -2427
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +5 -16
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +3 -10
- package/dist/lib/hive/HiveSqlLexer.js +1 -2
- package/dist/lib/hive/HiveSqlParser.d.ts +6 -1
- package/dist/lib/hive/HiveSqlParser.js +664 -639
- package/dist/lib/impala/ImpalaSqlLexer.js +1 -2
- package/dist/lib/impala/ImpalaSqlParser.d.ts +123 -107
- package/dist/lib/impala/ImpalaSqlParser.js +3223 -3155
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
- package/dist/lib/mysql/MySqlLexer.js +1 -2
- package/dist/lib/mysql/MySqlParser.d.ts +469 -422
- package/dist/lib/mysql/MySqlParser.js +11460 -10509
- package/dist/lib/mysql/MySqlParserListener.d.ts +33 -11
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +21 -7
- package/dist/lib/postgresql/PostgreSqlLexer.js +1 -2
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +2028 -6267
- package/dist/lib/postgresql/PostgreSqlParser.js +59638 -88361
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +1688 -6083
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +712 -3511
- package/dist/lib/spark/SparkSqlLexer.js +1 -2
- package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
- package/dist/lib/spark/SparkSqlParser.js +50 -51
- package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
- package/dist/lib/trino/TrinoSqlLexer.d.ts +323 -260
- package/dist/lib/trino/TrinoSqlLexer.js +1610 -1264
- package/dist/lib/trino/TrinoSqlListener.d.ts +1311 -200
- package/dist/lib/trino/TrinoSqlParser.d.ts +1908 -562
- package/dist/lib/trino/TrinoSqlParser.js +22629 -13412
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +761 -69
- package/dist/locale/locale.d.ts +41 -0
- package/dist/locale/locale.js +43 -0
- package/dist/parser/common/basicSQL.d.ts +7 -2
- package/dist/parser/common/basicSQL.js +5 -15
- package/dist/parser/common/entityCollector.d.ts +60 -12
- package/dist/parser/common/entityCollector.js +141 -17
- package/dist/parser/common/parseErrorListener.d.ts +6 -3
- package/dist/parser/common/parseErrorListener.js +83 -2
- package/dist/parser/common/textAndWord.d.ts +6 -9
- package/dist/parser/common/textAndWord.js +9 -20
- package/dist/parser/common/transform.d.ts +8 -0
- package/dist/parser/common/transform.js +11 -0
- package/dist/parser/common/types.d.ts +1 -0
- package/dist/parser/flink/flinkEntityCollector.js +40 -6
- package/dist/parser/flink/flinkErrorListener.d.ts +9 -0
- package/dist/parser/flink/flinkErrorListener.js +67 -0
- package/dist/parser/flink/index.d.ts +3 -0
- package/dist/parser/flink/index.js +13 -9
- package/dist/parser/hive/hiveEntityCollector.js +40 -6
- package/dist/parser/hive/hiveErrorListener.d.ts +9 -0
- package/dist/parser/hive/hiveErrorListener.js +65 -0
- package/dist/parser/hive/index.d.ts +3 -0
- package/dist/parser/hive/index.js +13 -9
- package/dist/parser/impala/ImpalaErrorListener.d.ts +9 -0
- package/dist/parser/impala/ImpalaErrorListener.js +63 -0
- package/dist/parser/impala/impalaEntityCollector.js +51 -6
- package/dist/parser/impala/index.d.ts +3 -0
- package/dist/parser/impala/index.js +4 -0
- package/dist/parser/mysql/index.d.ts +3 -0
- package/dist/parser/mysql/index.js +4 -0
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +3 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +40 -5
- package/dist/parser/mysql/mysqlErrorListener.d.ts +9 -0
- package/dist/parser/mysql/mysqlErrorListener.js +63 -0
- package/dist/parser/postgresql/index.d.ts +3 -0
- package/dist/parser/postgresql/index.js +17 -13
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +44 -4
- package/dist/parser/postgresql/postgreErrorListener.d.ts +9 -0
- package/dist/parser/postgresql/postgreErrorListener.js +71 -0
- package/dist/parser/spark/index.d.ts +3 -0
- package/dist/parser/spark/index.js +4 -0
- package/dist/parser/spark/sparkEntityCollector.d.ts +1 -1
- package/dist/parser/spark/sparkEntityCollector.js +43 -6
- package/dist/parser/spark/sparkErrorListener.d.ts +9 -0
- package/dist/parser/spark/sparkErrorListener.js +63 -0
- package/dist/parser/trino/index.d.ts +3 -0
- package/dist/parser/trino/index.js +23 -10
- package/dist/parser/trino/trinoEntityCollector.d.ts +6 -4
- package/dist/parser/trino/trinoEntityCollector.js +44 -9
- package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
- package/dist/parser/trino/trinoErrorListener.js +65 -0
- package/package.json +37 -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
|
-
>
|
|
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)
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,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 { StmtContext, EntityContext } from './parser/common/entityCollector';
|
|
8
|
+
export type { StmtContext, EntityContext, CommonEntityContext, ColumnEntityContext, FuncEntityContext, } from './parser/common/entityCollector';
|
|
@@ -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
|
|
585
|
-
static readonly
|
|
586
|
-
static readonly
|
|
587
|
-
static readonly
|
|
588
|
-
static readonly
|
|
589
|
-
static readonly
|
|
590
|
-
static readonly
|
|
591
|
-
static readonly
|
|
592
|
-
static readonly
|
|
593
|
-
static readonly
|
|
594
|
-
static readonly
|
|
595
|
-
static readonly
|
|
596
|
-
static readonly
|
|
597
|
-
static readonly
|
|
598
|
-
static readonly
|
|
599
|
-
static readonly
|
|
600
|
-
static readonly
|
|
601
|
-
static readonly
|
|
602
|
-
static readonly
|
|
603
|
-
static readonly
|
|
604
|
-
static readonly
|
|
605
|
-
static readonly
|
|
606
|
-
static readonly
|
|
607
|
-
static readonly
|
|
608
|
-
static readonly
|
|
609
|
-
static readonly
|
|
610
|
-
static readonly
|
|
611
|
-
static readonly
|
|
612
|
-
static readonly
|
|
613
|
-
static readonly
|
|
614
|
-
static readonly
|
|
615
|
-
static readonly
|
|
616
|
-
static readonly
|
|
617
|
-
static readonly
|
|
618
|
-
static readonly
|
|
619
|
-
static readonly
|
|
620
|
-
static readonly
|
|
621
|
-
static readonly
|
|
622
|
-
static readonly
|
|
623
|
-
static readonly
|
|
624
|
-
static readonly
|
|
625
|
-
static readonly
|
|
626
|
-
static readonly
|
|
627
|
-
static readonly
|
|
628
|
-
static readonly
|
|
629
|
-
static readonly
|
|
630
|
-
static readonly
|
|
631
|
-
static readonly
|
|
632
|
-
static readonly
|
|
633
|
-
static readonly
|
|
634
|
-
static readonly
|
|
635
|
-
static readonly
|
|
636
|
-
static readonly
|
|
637
|
-
static readonly
|
|
638
|
-
static readonly
|
|
639
|
-
static readonly
|
|
640
|
-
static readonly
|
|
641
|
-
static readonly
|
|
642
|
-
static readonly
|
|
643
|
-
static readonly
|
|
644
|
-
static readonly
|
|
645
|
-
static readonly
|
|
646
|
-
static readonly
|
|
647
|
-
static readonly
|
|
648
|
-
static readonly
|
|
649
|
-
static readonly
|
|
650
|
-
static readonly
|
|
651
|
-
static readonly
|
|
652
|
-
static readonly
|
|
653
|
-
static readonly
|
|
654
|
-
static readonly
|
|
655
|
-
static readonly
|
|
656
|
-
static readonly
|
|
657
|
-
static readonly
|
|
658
|
-
static readonly
|
|
659
|
-
static readonly
|
|
660
|
-
static readonly
|
|
661
|
-
static readonly
|
|
662
|
-
static readonly
|
|
663
|
-
static readonly
|
|
664
|
-
static readonly
|
|
665
|
-
static readonly
|
|
666
|
-
static readonly
|
|
667
|
-
static readonly
|
|
668
|
-
static readonly
|
|
669
|
-
static readonly
|
|
670
|
-
static readonly
|
|
671
|
-
static readonly
|
|
672
|
-
static readonly
|
|
673
|
-
static readonly
|
|
674
|
-
static readonly
|
|
675
|
-
static readonly
|
|
676
|
-
static readonly
|
|
677
|
-
static readonly
|
|
678
|
-
static readonly
|
|
679
|
-
static readonly
|
|
680
|
-
static readonly
|
|
681
|
-
static readonly
|
|
682
|
-
static readonly
|
|
683
|
-
static readonly
|
|
684
|
-
static readonly
|
|
685
|
-
static readonly
|
|
686
|
-
static readonly
|
|
687
|
-
static readonly
|
|
688
|
-
static readonly
|
|
689
|
-
static readonly
|
|
690
|
-
static readonly
|
|
691
|
-
static readonly
|
|
692
|
-
static readonly
|
|
693
|
-
static readonly
|
|
694
|
-
static readonly
|
|
695
|
-
static readonly
|
|
696
|
-
static readonly
|
|
697
|
-
static readonly
|
|
698
|
-
static readonly
|
|
699
|
-
static readonly
|
|
700
|
-
static readonly
|
|
701
|
-
static readonly
|
|
702
|
-
static readonly
|
|
703
|
-
static readonly
|
|
704
|
-
static readonly
|
|
705
|
-
static readonly
|
|
706
|
-
static readonly
|
|
707
|
-
static readonly
|
|
708
|
-
static readonly
|
|
709
|
-
static readonly
|
|
710
|
-
static readonly
|
|
711
|
-
static readonly
|
|
712
|
-
static readonly
|
|
713
|
-
static readonly
|
|
714
|
-
static readonly
|
|
715
|
-
static readonly
|
|
716
|
-
static readonly
|
|
717
|
-
static readonly
|
|
718
|
-
static readonly
|
|
719
|
-
static readonly
|
|
720
|
-
static readonly
|
|
721
|
-
static readonly
|
|
722
|
-
static readonly
|
|
723
|
-
static readonly
|
|
724
|
-
static readonly
|
|
725
|
-
static readonly
|
|
726
|
-
static readonly
|
|
727
|
-
static readonly
|
|
728
|
-
static readonly
|
|
729
|
-
static readonly
|
|
730
|
-
static readonly
|
|
731
|
-
static readonly
|
|
732
|
-
static readonly
|
|
733
|
-
static readonly
|
|
734
|
-
static readonly
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -1419,12 +1420,14 @@ export declare class MapTypeDimensionContext extends antlr.ParserRuleContext {
|
|
|
1419
1420
|
}
|
|
1420
1421
|
export declare class RowTypeDimensionContext extends antlr.ParserRuleContext {
|
|
1421
1422
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1422
|
-
LESS_SYMBOL(): antlr.TerminalNode;
|
|
1423
1423
|
columnName(): ColumnNameContext[];
|
|
1424
1424
|
columnName(i: number): ColumnNameContext | null;
|
|
1425
1425
|
columnType(): ColumnTypeContext[];
|
|
1426
1426
|
columnType(i: number): ColumnTypeContext | null;
|
|
1427
|
-
|
|
1427
|
+
LR_BRACKET(): antlr.TerminalNode | null;
|
|
1428
|
+
LESS_SYMBOL(): antlr.TerminalNode | null;
|
|
1429
|
+
RR_BRACKET(): antlr.TerminalNode | null;
|
|
1430
|
+
GREATER_SYMBOL(): antlr.TerminalNode | null;
|
|
1428
1431
|
COMMA(): antlr.TerminalNode[];
|
|
1429
1432
|
COMMA(i: number): antlr.TerminalNode | null;
|
|
1430
1433
|
get ruleIndex(): number;
|
|
@@ -1446,15 +1449,6 @@ export declare class ColumnConstraintContext extends antlr.ParserRuleContext {
|
|
|
1446
1449
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
1447
1450
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1448
1451
|
}
|
|
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
1452
|
export declare class MetadataColumnDefinitionContext extends antlr.ParserRuleContext {
|
|
1459
1453
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1460
1454
|
columnNameCreate(): ColumnNameCreateContext;
|
|
@@ -1477,11 +1471,13 @@ export declare class MetadataKeyContext extends antlr.ParserRuleContext {
|
|
|
1477
1471
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1478
1472
|
}
|
|
1479
1473
|
export declare class ComputedColumnDefinitionContext extends antlr.ParserRuleContext {
|
|
1474
|
+
_comment?: Token | null;
|
|
1480
1475
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1481
1476
|
columnNameCreate(): ColumnNameCreateContext;
|
|
1482
1477
|
KW_AS(): antlr.TerminalNode;
|
|
1483
1478
|
computedColumnExpression(): ComputedColumnExpressionContext;
|
|
1484
|
-
|
|
1479
|
+
KW_COMMENT(): antlr.TerminalNode | null;
|
|
1480
|
+
STRING_LITERAL(): antlr.TerminalNode | null;
|
|
1485
1481
|
get ruleIndex(): number;
|
|
1486
1482
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
1487
1483
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
@@ -1636,19 +1632,22 @@ export declare class CreateCatalogContext extends antlr.ParserRuleContext {
|
|
|
1636
1632
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1637
1633
|
}
|
|
1638
1634
|
export declare class CreateDatabaseContext extends antlr.ParserRuleContext {
|
|
1635
|
+
_comment?: Token | null;
|
|
1639
1636
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1640
1637
|
KW_CREATE(): antlr.TerminalNode;
|
|
1641
1638
|
KW_DATABASE(): antlr.TerminalNode;
|
|
1642
1639
|
databasePathCreate(): DatabasePathCreateContext;
|
|
1643
1640
|
withOption(): WithOptionContext;
|
|
1644
1641
|
ifNotExists(): IfNotExistsContext | null;
|
|
1645
|
-
|
|
1642
|
+
KW_COMMENT(): antlr.TerminalNode | null;
|
|
1643
|
+
STRING_LITERAL(): antlr.TerminalNode | null;
|
|
1646
1644
|
get ruleIndex(): number;
|
|
1647
1645
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
1648
1646
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
1649
1647
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1650
1648
|
}
|
|
1651
1649
|
export declare class CreateViewContext extends antlr.ParserRuleContext {
|
|
1650
|
+
_comment?: Token | null;
|
|
1652
1651
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1653
1652
|
KW_CREATE(): antlr.TerminalNode;
|
|
1654
1653
|
KW_VIEW(): antlr.TerminalNode;
|
|
@@ -1658,7 +1657,8 @@ export declare class CreateViewContext extends antlr.ParserRuleContext {
|
|
|
1658
1657
|
KW_TEMPORARY(): antlr.TerminalNode | null;
|
|
1659
1658
|
ifNotExists(): IfNotExistsContext | null;
|
|
1660
1659
|
columnNameList(): ColumnNameListContext | null;
|
|
1661
|
-
|
|
1660
|
+
KW_COMMENT(): antlr.TerminalNode | null;
|
|
1661
|
+
STRING_LITERAL(): antlr.TerminalNode | null;
|
|
1662
1662
|
get ruleIndex(): number;
|
|
1663
1663
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
1664
1664
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
@@ -1785,7 +1785,7 @@ export declare class NotForcedContext extends antlr.ParserRuleContext {
|
|
|
1785
1785
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
1786
1786
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1787
1787
|
}
|
|
1788
|
-
export declare class
|
|
1788
|
+
export declare class AlterViewContext extends antlr.ParserRuleContext {
|
|
1789
1789
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1790
1790
|
KW_ALTER(): antlr.TerminalNode;
|
|
1791
1791
|
KW_VIEW(): antlr.TerminalNode;
|
|
@@ -2153,8 +2153,6 @@ export declare class TablePrimaryContext extends antlr.ParserRuleContext {
|
|
|
2153
2153
|
tablePath(): TablePathContext | null;
|
|
2154
2154
|
KW_TABLE(): antlr.TerminalNode | null;
|
|
2155
2155
|
systemTimePeriod(): SystemTimePeriodContext | null;
|
|
2156
|
-
correlationName(): CorrelationNameContext | null;
|
|
2157
|
-
KW_AS(): antlr.TerminalNode | null;
|
|
2158
2156
|
viewPath(): ViewPathContext | null;
|
|
2159
2157
|
KW_LATERAL(): antlr.TerminalNode | null;
|
|
2160
2158
|
LR_BRACKET(): antlr.TerminalNode[];
|
|
@@ -2490,6 +2488,8 @@ export declare class PartitionByClauseContext extends antlr.ParserRuleContext {
|
|
|
2490
2488
|
KW_BY(): antlr.TerminalNode;
|
|
2491
2489
|
columnName(): ColumnNameContext[];
|
|
2492
2490
|
columnName(i: number): ColumnNameContext | null;
|
|
2491
|
+
primaryExpression(): PrimaryExpressionContext[];
|
|
2492
|
+
primaryExpression(i: number): PrimaryExpressionContext | null;
|
|
2493
2493
|
COMMA(): antlr.TerminalNode[];
|
|
2494
2494
|
COMMA(i: number): antlr.TerminalNode | null;
|
|
2495
2495
|
get ruleIndex(): number;
|
|
@@ -3093,6 +3093,7 @@ export declare class IntervalValueContext extends antlr.ParserRuleContext {
|
|
|
3093
3093
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
3094
3094
|
}
|
|
3095
3095
|
export declare class TableAliasContext extends antlr.ParserRuleContext {
|
|
3096
|
+
_alias?: IdentifierContext;
|
|
3096
3097
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
3097
3098
|
identifier(): IdentifierContext;
|
|
3098
3099
|
KW_AS(): antlr.TerminalNode | null;
|
|
@@ -3550,6 +3551,10 @@ export declare class ReservedKeywordsUsedAsFuncParamContext extends antlr.Parser
|
|
|
3550
3551
|
KW_ALL(): antlr.TerminalNode | null;
|
|
3551
3552
|
KW_BOTH(): antlr.TerminalNode | null;
|
|
3552
3553
|
KW_CURRENT_TIMESTAMP(): antlr.TerminalNode | null;
|
|
3554
|
+
KW_CURRENT_DATE(): antlr.TerminalNode | null;
|
|
3555
|
+
KW_CURRENT_TIME(): antlr.TerminalNode | null;
|
|
3556
|
+
KW_LOCALTIME(): antlr.TerminalNode | null;
|
|
3557
|
+
KW_LOCALTIMESTAMP(): antlr.TerminalNode | null;
|
|
3553
3558
|
KW_DISTINCT(): antlr.TerminalNode | null;
|
|
3554
3559
|
KW_LEADING(): antlr.TerminalNode | null;
|
|
3555
3560
|
KW_TRAILING(): antlr.TerminalNode | null;
|