dt-sql-parser 4.5.0-beta.0 → 4.5.0-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/dist/lib/SQLParserBase.d.ts +13 -1
- package/dist/lib/SQLParserBase.js +40 -5
- package/dist/lib/flink/FlinkSqlParser.d.ts +222 -179
- package/dist/lib/flink/FlinkSqlParser.js +3300 -2949
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +33 -0
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +21 -0
- package/dist/lib/hive/HiveSqlParser.d.ts +274 -228
- package/dist/lib/hive/HiveSqlParser.js +6304 -5912
- package/dist/lib/hive/HiveSqlParserListener.d.ts +33 -0
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +21 -0
- package/dist/lib/impala/ImpalaSqlParser.d.ts +145 -103
- package/dist/lib/impala/ImpalaSqlParser.js +3687 -3320
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +33 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +21 -0
- package/dist/lib/mysql/MySqlParser.d.ts +161 -94
- package/dist/lib/mysql/MySqlParser.js +9959 -9499
- package/dist/lib/mysql/MySqlParserListener.d.ts +79 -5
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +49 -3
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +108 -71
- package/dist/lib/postgresql/PostgreSqlParser.js +13330 -10388
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +48 -0
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +30 -0
- package/dist/lib/spark/SparkSqlParser.d.ts +185 -145
- package/dist/lib/spark/SparkSqlParser.js +5463 -5152
- package/dist/lib/spark/SparkSqlParserListener.d.ts +33 -0
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +21 -0
- package/dist/parser/common/basicSQL.d.ts +5 -5
- package/dist/parser/common/basicSQL.js +3 -3
- package/dist/parser/common/entityCollector.js +14 -2
- package/dist/parser/flink/index.js +5 -2
- package/dist/parser/mysql/index.js +3 -1
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +2 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +13 -3
- package/dist/parser/mysql/mysqlErrorListener.js +2 -0
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +3 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +13 -0
- package/dist/parser/spark/index.js +3 -1
- package/package.json +1 -1
|
@@ -4,5 +4,17 @@ export declare abstract class SQLParserBase<T = antlr.ParserRuleContext> extends
|
|
|
4
4
|
abstract program(): T;
|
|
5
5
|
caretTokenIndex: number;
|
|
6
6
|
entityCollecting: boolean;
|
|
7
|
-
|
|
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;
|
|
8
20
|
}
|
|
@@ -5,10 +5,45 @@ export class SQLParserBase extends antlr.Parser {
|
|
|
5
5
|
this.caretTokenIndex = -1;
|
|
6
6
|
this.entityCollecting = false;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|
|
13
48
|
}
|
|
14
49
|
}
|
|
@@ -572,183 +572,186 @@ 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
|
|
576
|
-
static readonly
|
|
577
|
-
static readonly
|
|
578
|
-
static readonly
|
|
579
|
-
static readonly
|
|
580
|
-
static readonly
|
|
581
|
-
static readonly
|
|
582
|
-
static readonly
|
|
583
|
-
static readonly
|
|
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
|
|
736
|
-
static readonly
|
|
737
|
-
static readonly
|
|
738
|
-
static readonly
|
|
739
|
-
static readonly
|
|
740
|
-
static readonly
|
|
741
|
-
static readonly
|
|
742
|
-
static readonly
|
|
743
|
-
static readonly
|
|
744
|
-
static readonly
|
|
745
|
-
static readonly
|
|
746
|
-
static readonly
|
|
747
|
-
static readonly
|
|
748
|
-
static readonly
|
|
749
|
-
static readonly
|
|
750
|
-
static readonly
|
|
751
|
-
static readonly
|
|
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;
|
|
752
755
|
static readonly literalNames: (string | null)[];
|
|
753
756
|
static readonly symbolicNames: (string | null)[];
|
|
754
757
|
static readonly ruleNames: string[];
|
|
@@ -785,8 +788,10 @@ export declare class FlinkSqlParser extends SQLParserBase {
|
|
|
785
788
|
columnOptionDefinition(): ColumnOptionDefinitionContext;
|
|
786
789
|
physicalColumnDefinition(): PhysicalColumnDefinitionContext;
|
|
787
790
|
columnNameCreate(): ColumnNameCreateContext;
|
|
791
|
+
emptyColumn(): EmptyColumnContext;
|
|
788
792
|
columnName(): ColumnNameContext;
|
|
789
793
|
columnNamePath(): ColumnNamePathContext;
|
|
794
|
+
columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext;
|
|
790
795
|
columnNameList(): ColumnNameListContext;
|
|
791
796
|
columnType(): ColumnTypeContext;
|
|
792
797
|
lengthOneDimension(): LengthOneDimensionContext;
|
|
@@ -942,6 +947,7 @@ export declare class FlinkSqlParser extends SQLParserBase {
|
|
|
942
947
|
viewPath(): ViewPathContext;
|
|
943
948
|
viewPathCreate(): ViewPathCreateContext;
|
|
944
949
|
uid(): UidContext;
|
|
950
|
+
uidAllowEmpty(): UidAllowEmptyContext;
|
|
945
951
|
withOption(): WithOptionContext;
|
|
946
952
|
ifNotExists(): IfNotExistsContext;
|
|
947
953
|
ifExists(): IfExistsContext;
|
|
@@ -969,11 +975,14 @@ export declare class FlinkSqlParser extends SQLParserBase {
|
|
|
969
975
|
nonReservedKeywords(): NonReservedKeywordsContext;
|
|
970
976
|
sempred(localContext: antlr.RuleContext | null, ruleIndex: number, predIndex: number): boolean;
|
|
971
977
|
private columnName_sempred;
|
|
978
|
+
private columnNamePathAllowEmpty_sempred;
|
|
972
979
|
private queryStatement_sempred;
|
|
980
|
+
private columnProjectItem_sempred;
|
|
973
981
|
private tableExpression_sempred;
|
|
974
982
|
private booleanExpression_sempred;
|
|
975
983
|
private valueExpression_sempred;
|
|
976
984
|
private primaryExpression_sempred;
|
|
985
|
+
private uidAllowEmpty_sempred;
|
|
977
986
|
static readonly _serializedATN: number[];
|
|
978
987
|
private static __ATN;
|
|
979
988
|
static get _ATN(): antlr.ATN;
|
|
@@ -1328,9 +1337,17 @@ export declare class ColumnNameCreateContext extends antlr.ParserRuleContext {
|
|
|
1328
1337
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
1329
1338
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1330
1339
|
}
|
|
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
|
+
}
|
|
1331
1347
|
export declare class ColumnNameContext extends antlr.ParserRuleContext {
|
|
1332
1348
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1333
|
-
|
|
1349
|
+
uidAllowEmpty(): UidAllowEmptyContext | null;
|
|
1350
|
+
emptyColumn(): EmptyColumnContext | null;
|
|
1334
1351
|
get ruleIndex(): number;
|
|
1335
1352
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
1336
1353
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
@@ -1344,6 +1361,15 @@ export declare class ColumnNamePathContext extends antlr.ParserRuleContext {
|
|
|
1344
1361
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
1345
1362
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
1346
1363
|
}
|
|
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
|
+
}
|
|
1347
1373
|
export declare class ColumnNameListContext extends antlr.ParserRuleContext {
|
|
1348
1374
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
1349
1375
|
LR_BRACKET(): antlr.TerminalNode;
|
|
@@ -2149,6 +2175,7 @@ export declare class ColumnProjectItemContext extends antlr.ParserRuleContext {
|
|
|
2149
2175
|
tableAllColumns(): TableAllColumnsContext | null;
|
|
2150
2176
|
selectExpressionColumnName(): SelectExpressionColumnNameContext | null;
|
|
2151
2177
|
columnName(): ColumnNameContext | null;
|
|
2178
|
+
emptyColumn(): EmptyColumnContext | null;
|
|
2152
2179
|
get ruleIndex(): number;
|
|
2153
2180
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
2154
2181
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
@@ -2414,6 +2441,9 @@ export declare class JoinConditionContext extends antlr.ParserRuleContext {
|
|
|
2414
2441
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2415
2442
|
KW_ON(): antlr.TerminalNode | null;
|
|
2416
2443
|
booleanExpression(): BooleanExpressionContext | null;
|
|
2444
|
+
columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext[];
|
|
2445
|
+
columnNamePathAllowEmpty(i: number): ColumnNamePathAllowEmptyContext | null;
|
|
2446
|
+
EQUAL_SYMBOL(): antlr.TerminalNode | null;
|
|
2417
2447
|
KW_USING(): antlr.TerminalNode | null;
|
|
2418
2448
|
columnNameList(): ColumnNameListContext | null;
|
|
2419
2449
|
get ruleIndex(): number;
|
|
@@ -2424,7 +2454,8 @@ export declare class JoinConditionContext extends antlr.ParserRuleContext {
|
|
|
2424
2454
|
export declare class WhereClauseContext extends antlr.ParserRuleContext {
|
|
2425
2455
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2426
2456
|
KW_WHERE(): antlr.TerminalNode;
|
|
2427
|
-
booleanExpression(): BooleanExpressionContext;
|
|
2457
|
+
booleanExpression(): BooleanExpressionContext | null;
|
|
2458
|
+
columnNamePathAllowEmpty(): ColumnNamePathAllowEmptyContext | null;
|
|
2428
2459
|
get ruleIndex(): number;
|
|
2429
2460
|
enterRule(listener: FlinkSqlParserListener): void;
|
|
2430
2461
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
@@ -3462,6 +3493,18 @@ export declare class UidContext extends antlr.ParserRuleContext {
|
|
|
3462
3493
|
exitRule(listener: FlinkSqlParserListener): void;
|
|
3463
3494
|
accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
|
|
3464
3495
|
}
|
|
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
|
+
}
|
|
3465
3508
|
export declare class WithOptionContext extends antlr.ParserRuleContext {
|
|
3466
3509
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
3467
3510
|
KW_WITH(): antlr.TerminalNode;
|