dt-sql-parser 4.4.0-beta.0 → 4.5.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 (53) hide show
  1. package/README.md +140 -3
  2. package/dist/lib/flink/FlinkSqlParser.d.ts +221 -114
  3. package/dist/lib/flink/FlinkSqlParser.js +3608 -2907
  4. package/dist/lib/flink/FlinkSqlParserListener.d.ts +99 -0
  5. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +63 -0
  6. package/dist/lib/hive/HiveSqlParser.d.ts +169 -116
  7. package/dist/lib/hive/HiveSqlParser.js +5708 -5428
  8. package/dist/lib/hive/HiveSqlParserListener.d.ts +55 -0
  9. package/dist/lib/hive/HiveSqlParserVisitor.d.ts +35 -0
  10. package/dist/lib/impala/ImpalaSqlParser.d.ts +150 -81
  11. package/dist/lib/impala/ImpalaSqlParser.js +3730 -3323
  12. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +76 -14
  13. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +48 -8
  14. package/dist/lib/mysql/MySqlParser.d.ts +346 -316
  15. package/dist/lib/mysql/MySqlParser.js +10224 -10020
  16. package/dist/lib/mysql/MySqlParserListener.d.ts +55 -26
  17. package/dist/lib/mysql/MySqlParserVisitor.d.ts +33 -14
  18. package/dist/lib/postgresql/PostgreSqlParser.d.ts +215 -169
  19. package/dist/lib/postgresql/PostgreSqlParser.js +10333 -10051
  20. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +51 -7
  21. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +32 -4
  22. package/dist/lib/spark/SparkSqlParser.d.ts +215 -90
  23. package/dist/lib/spark/SparkSqlParser.js +5143 -4496
  24. package/dist/lib/spark/SparkSqlParserListener.d.ts +147 -5
  25. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +92 -3
  26. package/dist/lib/trino/TrinoSqlListener.d.ts +90 -37
  27. package/dist/lib/trino/TrinoSqlParser.d.ts +219 -165
  28. package/dist/lib/trino/TrinoSqlParser.js +4942 -4615
  29. package/dist/lib/trino/TrinoSqlVisitor.d.ts +55 -21
  30. package/dist/parser/common/basicSQL.js +2 -0
  31. package/dist/parser/common/entityCollector.d.ts +91 -4
  32. package/dist/parser/common/entityCollector.js +215 -11
  33. package/dist/parser/common/textAndWord.d.ts +9 -1
  34. package/dist/parser/common/textAndWord.js +2 -0
  35. package/dist/parser/common/types.d.ts +2 -0
  36. package/dist/parser/common/types.js +2 -0
  37. package/dist/parser/flink/flinkEntityCollector.d.ts +10 -2
  38. package/dist/parser/flink/flinkEntityCollector.js +76 -14
  39. package/dist/parser/hive/hiveEntityCollector.d.ts +13 -1
  40. package/dist/parser/hive/hiveEntityCollector.js +85 -12
  41. package/dist/parser/impala/impalaEntityCollector.d.ts +7 -1
  42. package/dist/parser/impala/impalaEntityCollector.js +63 -12
  43. package/dist/parser/impala/index.js +2 -1
  44. package/dist/parser/mysql/mysqlEntityCollector.d.ts +9 -1
  45. package/dist/parser/mysql/mysqlEntityCollector.js +55 -12
  46. package/dist/parser/postgresql/postgreEntityCollector.d.ts +10 -1
  47. package/dist/parser/postgresql/postgreEntityCollector.js +86 -22
  48. package/dist/parser/spark/sparkEntityCollector.d.ts +13 -1
  49. package/dist/parser/spark/sparkEntityCollector.js +88 -12
  50. package/dist/parser/trino/index.js +2 -1
  51. package/dist/parser/trino/trinoEntityCollector.d.ts +7 -1
  52. package/dist/parser/trino/trinoEntityCollector.js +53 -12
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -347,9 +347,8 @@ Call the `getAllEntities` method on the SQL instance, and pass in the sql text a
347
347
  },
348
348
  relatedEntities: null,
349
349
  columns: null,
350
- isAlias: false,
351
- origin: null,
352
- alias: null
350
+ _alias: null,
351
+ _comment: null
353
352
  }
354
353
  ]
355
354
  */
@@ -357,6 +356,144 @@ Call the `getAllEntities` method on the SQL instance, and pass in the sql text a
357
356
 
358
357
  Position is not required, if the position is passed, then in the collected entities, if the entity is located under the statement where the corresponding position is located, then the statement object to which the entity belongs will be marked with `isContainCaret`, which can help you quickly filter out the required entities when combined with the code completion function.
359
358
 
359
+ In nested subquery scenarios, `isContainCaret` may not be sufficient to filter out the required entities. For example, for SQL: `SELECT id FROM t1 LEFT JOIN (SELECT id, name FROM t2) AS t3 ON t1.id = t3.id`, when our cursor is inside the inner query `t3` derived table, we expect to provide field completion for the `t2` table, but since both `t1` and `t2` have `isContainCaret` as `true`, we cannot distinguish available table entities in more detail.
360
+
361
+ Therefore, for entity types with `entityContextType` as `table`, collected entities will have an `isAccessible` flag to indicate whether the entity is accessible. `isAccessible` uses scope depth internally to determine accessibility. When the entity's statement scope depth equals the cursor's statement scope depth and `isContainCaret` is `true`, the entity is considered accessible (though this determination method is not absolute, it can exclude most irrelevant entities).
362
+
363
+ #### Additional Entity Information
364
+
365
+ **Alias Information**
366
+
367
+ When an entity has an alias, the entity object will contain the `_alias` field:
368
+ - `_alias`: Detailed alias information, including text content and position information
369
+
370
+ ```typescript
371
+ // Example: SELECT u.name FROM users AS u
372
+ {
373
+ entityContextType: 'table',
374
+ text: 'users',
375
+ _alias: { // Table alias information
376
+ text: 'u',
377
+ startIndex: 29,
378
+ endIndex: 29,
379
+ startColumn: 30,
380
+ endColumn: 31,
381
+ line: 1
382
+ }
383
+ }
384
+
385
+ // Example: SELECT name AS username FROM users
386
+ {
387
+ entityContextType: 'column',
388
+ text: 'name',
389
+ _alias: { // Column alias information
390
+ text: 'username',
391
+ startIndex: 15,
392
+ endIndex: 22,
393
+ startColumn: 16,
394
+ endColumn: 24,
395
+ line: 1
396
+ }
397
+ }
398
+ ```
399
+
400
+ **Declaration Type (DeclareType)**
401
+
402
+ The `declareType` field identifies how an entity is declared, with different entity types having different declaration types:
403
+
404
+ **Table Entity Declaration Types (TableDeclareType):**
405
+ - `LITERAL`: Literal table name, e.g., `SELECT * FROM users`
406
+ - `EXPRESSION`: Table defined by expression, e.g., subquery `SELECT * FROM (SELECT * FROM users) AS t`
407
+
408
+ **Column Entity Declaration Types (ColumnDeclareType):**
409
+ - `LITERAL`: Literal column name, e.g., `SELECT id, name FROM users`
410
+ - `ALL`: Wildcard syntax, e.g., `SELECT users.* FROM users`
411
+ - `EXPRESSION`: Complex expressions like subqueries, CASE statements, function calls, etc.
412
+
413
+ ```typescript
414
+ // Examples of different declareType values
415
+ // 1. Literal column
416
+ {
417
+ entityContextType: 'column',
418
+ text: 'name',
419
+ declareType: ColumnDeclareType.LITERAL,
420
+ }
421
+
422
+ // 2. Wildcard column
423
+ {
424
+ entityContextType: 'column',
425
+ text: 'users.*',
426
+ declareType: ColumnDeclareType.ALL,
427
+ }
428
+
429
+ // 3. Expression column
430
+ {
431
+ entityContextType: 'column',
432
+ text: 'CASE WHEN age > 18 THEN "adult" ELSE "minor" END',
433
+ declareType: ColumnDeclareType.EXPRESSION,
434
+ }
435
+ ```
436
+
437
+ **Other Metadata Fields**
438
+
439
+ **Comment Information**
440
+ - `_comment`: Entity comment information, mainly used for column or table comments in CREATE statements
441
+
442
+ ```typescript
443
+ // Example: CREATE TABLE users (id INT COMMENT 'USERID', name VARCHAR(50) COMMENT 'USERNAME')
444
+ {
445
+ entityContextType: 'column',
446
+ text: 'id',
447
+ _comment: {
448
+ text: "'USERID'",
449
+ startIndex: 35,
450
+ endIndex: 42,
451
+ startColumn: 36,
452
+ endColumn: 44,
453
+ line: 1
454
+ },
455
+ _colType: {
456
+ text: 'INT',
457
+ startIndex: 23,
458
+ endIndex: 42,
459
+ startColumn: 24,
460
+ endColumn: 44,
461
+ line: 1
462
+ }
463
+ }
464
+ ```
465
+
466
+ **Column Type Information**
467
+ - `_colType`: Column data type information, only used for column entities in CREATE TABLE statements, includes type name and position information
468
+
469
+ ```typescript
470
+ // Example: CREATE TABLE users (name VARCHAR(50) NOT NULL)
471
+ {
472
+ entityContextType: 'columnCreate',
473
+ text: 'name',
474
+ _colType: {
475
+ text: 'VARCHAR(50)',
476
+ startIndex: 25,
477
+ endIndex: 35,
478
+ startColumn: 26,
479
+ endColumn: 37,
480
+ line: 1
481
+ }
482
+ }
483
+ ```
484
+
485
+ **Relationship Fields**
486
+ - `relatedEntities`: List of other entities related to the current entity, e.g., query result entities related to table entities
487
+ - `columns`: List of contained columns
488
+
489
+ A simple entity relationship example:
490
+
491
+ ```sql
492
+ CREATE TABLE tb1 AS SELECT id FROM tb2;
493
+ ```
494
+
495
+ ![relation-image](./docs/images/relation.png)
496
+
360
497
  ### Get semantic context information
361
498
 
362
499
  Call the `getSemanticContextAtCaretPosition` method on the SQL instance, passing in the sql text and the line and column numbers at the specified position, for example:
@@ -633,113 +633,122 @@ export declare class FlinkSqlParser extends SQLParserBase {
633
633
  static readonly RULE_withItemName = 84;
634
634
  static readonly RULE_selectStatement = 85;
635
635
  static readonly RULE_selectClause = 86;
636
- static readonly RULE_projectItemDefinition = 87;
637
- static readonly RULE_overWindowItem = 88;
638
- static readonly RULE_fromClause = 89;
639
- static readonly RULE_tableExpression = 90;
640
- static readonly RULE_tableReference = 91;
641
- static readonly RULE_tablePrimary = 92;
642
- static readonly RULE_systemTimePeriod = 93;
643
- static readonly RULE_dateTimeExpression = 94;
644
- static readonly RULE_inlineDataValueClause = 95;
645
- static readonly RULE_windowTVFClause = 96;
646
- static readonly RULE_windowTVFExpression = 97;
647
- static readonly RULE_windowTVFName = 98;
648
- static readonly RULE_windowTVFParam = 99;
649
- static readonly RULE_timeIntervalParamName = 100;
650
- static readonly RULE_columnDescriptor = 101;
651
- static readonly RULE_joinCondition = 102;
652
- static readonly RULE_whereClause = 103;
653
- static readonly RULE_groupByClause = 104;
654
- static readonly RULE_groupItemDefinition = 105;
655
- static readonly RULE_groupingSets = 106;
656
- static readonly RULE_groupingSetsNotationName = 107;
657
- static readonly RULE_groupWindowFunction = 108;
658
- static readonly RULE_groupWindowFunctionName = 109;
659
- static readonly RULE_timeAttrColumn = 110;
660
- static readonly RULE_havingClause = 111;
661
- static readonly RULE_windowClause = 112;
662
- static readonly RULE_namedWindow = 113;
663
- static readonly RULE_windowSpec = 114;
664
- static readonly RULE_matchRecognizeClause = 115;
665
- static readonly RULE_orderByClause = 116;
666
- static readonly RULE_orderItemDefinition = 117;
667
- static readonly RULE_limitClause = 118;
668
- static readonly RULE_partitionByClause = 119;
669
- static readonly RULE_quantifiers = 120;
670
- static readonly RULE_measuresClause = 121;
671
- static readonly RULE_patternDefinition = 122;
672
- static readonly RULE_patternVariable = 123;
673
- static readonly RULE_outputMode = 124;
674
- static readonly RULE_afterMatchStrategy = 125;
675
- static readonly RULE_patternVariablesDefinition = 126;
676
- static readonly RULE_windowFrame = 127;
677
- static readonly RULE_frameBound = 128;
678
- static readonly RULE_withinClause = 129;
679
- static readonly RULE_expression = 130;
680
- static readonly RULE_booleanExpression = 131;
681
- static readonly RULE_predicate = 132;
682
- static readonly RULE_likePredicate = 133;
683
- static readonly RULE_valueExpression = 134;
684
- static readonly RULE_functionCallExpression = 135;
685
- static readonly RULE_primaryExpression = 136;
686
- static readonly RULE_functionNameCreate = 137;
687
- static readonly RULE_functionName = 138;
688
- static readonly RULE_functionNameAndParams = 139;
689
- static readonly RULE_functionNameWithParams = 140;
690
- static readonly RULE_functionParam = 141;
691
- static readonly RULE_dereferenceDefinition = 142;
692
- static readonly RULE_correlationName = 143;
693
- static readonly RULE_qualifiedName = 144;
694
- static readonly RULE_timeIntervalExpression = 145;
695
- static readonly RULE_errorCapturingMultiUnitsInterval = 146;
696
- static readonly RULE_multiUnitsInterval = 147;
697
- static readonly RULE_errorCapturingUnitToUnitInterval = 148;
698
- static readonly RULE_unitToUnitInterval = 149;
699
- static readonly RULE_intervalValue = 150;
700
- static readonly RULE_tableAlias = 151;
701
- static readonly RULE_errorCapturingIdentifier = 152;
702
- static readonly RULE_errorCapturingIdentifierExtra = 153;
703
- static readonly RULE_identifierList = 154;
704
- static readonly RULE_identifierSeq = 155;
705
- static readonly RULE_identifier = 156;
706
- static readonly RULE_unquotedIdentifier = 157;
707
- static readonly RULE_quotedIdentifier = 158;
708
- static readonly RULE_whenClause = 159;
709
- static readonly RULE_catalogPath = 160;
710
- static readonly RULE_catalogPathCreate = 161;
711
- static readonly RULE_databasePath = 162;
712
- static readonly RULE_databasePathCreate = 163;
713
- static readonly RULE_tablePathCreate = 164;
714
- static readonly RULE_tablePath = 165;
715
- static readonly RULE_viewPath = 166;
716
- static readonly RULE_viewPathCreate = 167;
717
- static readonly RULE_uid = 168;
718
- static readonly RULE_withOption = 169;
719
- static readonly RULE_ifNotExists = 170;
720
- static readonly RULE_ifExists = 171;
721
- static readonly RULE_tablePropertyList = 172;
722
- static readonly RULE_tableProperty = 173;
723
- static readonly RULE_tablePropertyKey = 174;
724
- static readonly RULE_tablePropertyValue = 175;
725
- static readonly RULE_logicalOperator = 176;
726
- static readonly RULE_comparisonOperator = 177;
727
- static readonly RULE_bitOperator = 178;
728
- static readonly RULE_mathOperator = 179;
729
- static readonly RULE_unaryOperator = 180;
730
- static readonly RULE_constant = 181;
731
- static readonly RULE_timePointLiteral = 182;
732
- static readonly RULE_stringLiteral = 183;
733
- static readonly RULE_decimalLiteral = 184;
734
- static readonly RULE_booleanLiteral = 185;
735
- static readonly RULE_setQuantifier = 186;
736
- static readonly RULE_timePointUnit = 187;
737
- static readonly RULE_timeIntervalUnit = 188;
738
- static readonly RULE_reservedKeywordsUsedAsFuncParam = 189;
739
- static readonly RULE_reservedKeywordsNoParamsUsedAsFuncName = 190;
740
- static readonly RULE_reservedKeywordsFollowParamsUsedAsFuncName = 191;
741
- static readonly RULE_reservedKeywordsUsedAsFuncName = 192;
742
- static readonly RULE_nonReservedKeywords = 193;
636
+ static readonly RULE_selectList = 87;
637
+ static readonly RULE_columnProjectItem = 88;
638
+ static readonly RULE_selectWindowItemColumnName = 89;
639
+ static readonly RULE_selectExpressionColumnName = 90;
640
+ static readonly RULE_selectLiteralColumnName = 91;
641
+ static readonly RULE_columnAlias = 92;
642
+ static readonly RULE_projectItemDefinition = 93;
643
+ static readonly RULE_tableAllColumns = 94;
644
+ static readonly RULE_overWindowItem = 95;
645
+ static readonly RULE_fromClause = 96;
646
+ static readonly RULE_tableExpression = 97;
647
+ static readonly RULE_tableReference = 98;
648
+ static readonly RULE_tablePrimary = 99;
649
+ static readonly RULE_atomFunctionTable = 100;
650
+ static readonly RULE_atomExpressionTable = 101;
651
+ static readonly RULE_systemTimePeriod = 102;
652
+ static readonly RULE_dateTimeExpression = 103;
653
+ static readonly RULE_inlineDataValueClause = 104;
654
+ static readonly RULE_windowTVFClause = 105;
655
+ static readonly RULE_windowTVFExpression = 106;
656
+ static readonly RULE_windowTVFName = 107;
657
+ static readonly RULE_windowTVFParam = 108;
658
+ static readonly RULE_timeIntervalParamName = 109;
659
+ static readonly RULE_columnDescriptor = 110;
660
+ static readonly RULE_joinCondition = 111;
661
+ static readonly RULE_whereClause = 112;
662
+ static readonly RULE_groupByClause = 113;
663
+ static readonly RULE_groupItemDefinition = 114;
664
+ static readonly RULE_groupingSets = 115;
665
+ static readonly RULE_groupingSetsNotationName = 116;
666
+ static readonly RULE_groupWindowFunction = 117;
667
+ static readonly RULE_groupWindowFunctionName = 118;
668
+ static readonly RULE_timeAttrColumn = 119;
669
+ static readonly RULE_havingClause = 120;
670
+ static readonly RULE_windowClause = 121;
671
+ static readonly RULE_namedWindow = 122;
672
+ static readonly RULE_windowSpec = 123;
673
+ static readonly RULE_matchRecognizeClause = 124;
674
+ static readonly RULE_orderByClause = 125;
675
+ static readonly RULE_orderItemDefinition = 126;
676
+ static readonly RULE_limitClause = 127;
677
+ static readonly RULE_partitionByClause = 128;
678
+ static readonly RULE_quantifiers = 129;
679
+ static readonly RULE_measuresClause = 130;
680
+ static readonly RULE_patternDefinition = 131;
681
+ static readonly RULE_patternVariable = 132;
682
+ static readonly RULE_outputMode = 133;
683
+ static readonly RULE_afterMatchStrategy = 134;
684
+ static readonly RULE_patternVariablesDefinition = 135;
685
+ static readonly RULE_windowFrame = 136;
686
+ static readonly RULE_frameBound = 137;
687
+ static readonly RULE_withinClause = 138;
688
+ static readonly RULE_expression = 139;
689
+ static readonly RULE_booleanExpression = 140;
690
+ static readonly RULE_predicate = 141;
691
+ static readonly RULE_likePredicate = 142;
692
+ static readonly RULE_valueExpression = 143;
693
+ static readonly RULE_functionCallExpression = 144;
694
+ static readonly RULE_primaryExpression = 145;
695
+ static readonly RULE_functionNameCreate = 146;
696
+ static readonly RULE_functionName = 147;
697
+ static readonly RULE_functionNameAndParams = 148;
698
+ static readonly RULE_functionNameWithParams = 149;
699
+ static readonly RULE_functionParam = 150;
700
+ static readonly RULE_dereferenceDefinition = 151;
701
+ static readonly RULE_correlationName = 152;
702
+ static readonly RULE_qualifiedName = 153;
703
+ static readonly RULE_timeIntervalExpression = 154;
704
+ static readonly RULE_errorCapturingMultiUnitsInterval = 155;
705
+ static readonly RULE_multiUnitsInterval = 156;
706
+ static readonly RULE_errorCapturingUnitToUnitInterval = 157;
707
+ static readonly RULE_unitToUnitInterval = 158;
708
+ static readonly RULE_intervalValue = 159;
709
+ static readonly RULE_tableAlias = 160;
710
+ static readonly RULE_errorCapturingIdentifier = 161;
711
+ static readonly RULE_errorCapturingIdentifierExtra = 162;
712
+ static readonly RULE_identifierList = 163;
713
+ static readonly RULE_identifierSeq = 164;
714
+ static readonly RULE_identifier = 165;
715
+ static readonly RULE_unquotedIdentifier = 166;
716
+ static readonly RULE_quotedIdentifier = 167;
717
+ static readonly RULE_whenClause = 168;
718
+ static readonly RULE_catalogPath = 169;
719
+ static readonly RULE_catalogPathCreate = 170;
720
+ static readonly RULE_databasePath = 171;
721
+ static readonly RULE_databasePathCreate = 172;
722
+ static readonly RULE_tablePathCreate = 173;
723
+ static readonly RULE_tablePath = 174;
724
+ static readonly RULE_viewPath = 175;
725
+ static readonly RULE_viewPathCreate = 176;
726
+ static readonly RULE_uid = 177;
727
+ static readonly RULE_withOption = 178;
728
+ static readonly RULE_ifNotExists = 179;
729
+ static readonly RULE_ifExists = 180;
730
+ static readonly RULE_tablePropertyList = 181;
731
+ static readonly RULE_tableProperty = 182;
732
+ static readonly RULE_tablePropertyKey = 183;
733
+ static readonly RULE_tablePropertyValue = 184;
734
+ static readonly RULE_logicalOperator = 185;
735
+ static readonly RULE_comparisonOperator = 186;
736
+ static readonly RULE_bitOperator = 187;
737
+ static readonly RULE_mathOperator = 188;
738
+ static readonly RULE_unaryOperator = 189;
739
+ static readonly RULE_constant = 190;
740
+ static readonly RULE_timePointLiteral = 191;
741
+ static readonly RULE_stringLiteral = 192;
742
+ static readonly RULE_decimalLiteral = 193;
743
+ static readonly RULE_booleanLiteral = 194;
744
+ static readonly RULE_setQuantifier = 195;
745
+ static readonly RULE_timePointUnit = 196;
746
+ static readonly RULE_timeIntervalUnit = 197;
747
+ static readonly RULE_reservedKeywordsUsedAsFuncParam = 198;
748
+ static readonly RULE_reservedKeywordsNoParamsUsedAsFuncName = 199;
749
+ static readonly RULE_reservedKeywordsFollowParamsUsedAsFuncName = 200;
750
+ static readonly RULE_reservedKeywordsUsedAsFuncName = 201;
751
+ static readonly RULE_nonReservedKeywords = 202;
743
752
  static readonly literalNames: (string | null)[];
744
753
  static readonly symbolicNames: (string | null)[];
745
754
  static readonly ruleNames: string[];
@@ -838,13 +847,22 @@ export declare class FlinkSqlParser extends SQLParserBase {
838
847
  withItemName(): WithItemNameContext;
839
848
  selectStatement(): SelectStatementContext;
840
849
  selectClause(): SelectClauseContext;
850
+ selectList(): SelectListContext;
851
+ columnProjectItem(): ColumnProjectItemContext;
852
+ selectWindowItemColumnName(): SelectWindowItemColumnNameContext;
853
+ selectExpressionColumnName(): SelectExpressionColumnNameContext;
854
+ selectLiteralColumnName(): SelectLiteralColumnNameContext;
855
+ columnAlias(): ColumnAliasContext;
841
856
  projectItemDefinition(): ProjectItemDefinitionContext;
857
+ tableAllColumns(): TableAllColumnsContext;
842
858
  overWindowItem(): OverWindowItemContext;
843
859
  fromClause(): FromClauseContext;
844
860
  tableExpression(): TableExpressionContext;
845
861
  tableExpression(_p: number): TableExpressionContext;
846
862
  tableReference(): TableReferenceContext;
847
863
  tablePrimary(): TablePrimaryContext;
864
+ atomFunctionTable(): AtomFunctionTableContext;
865
+ atomExpressionTable(): AtomExpressionTableContext;
848
866
  systemTimePeriod(): SystemTimePeriodContext;
849
867
  dateTimeExpression(): DateTimeExpressionContext;
850
868
  inlineDataValueClause(): InlineDataValueClauseContext;
@@ -2103,10 +2121,17 @@ export declare class SelectStatementContext extends antlr.ParserRuleContext {
2103
2121
  export declare class SelectClauseContext extends antlr.ParserRuleContext {
2104
2122
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2105
2123
  KW_SELECT(): antlr.TerminalNode;
2106
- ASTERISK_SIGN(): antlr.TerminalNode | null;
2107
- projectItemDefinition(): ProjectItemDefinitionContext[];
2108
- projectItemDefinition(i: number): ProjectItemDefinitionContext | null;
2124
+ selectList(): SelectListContext;
2109
2125
  setQuantifier(): SetQuantifierContext | null;
2126
+ get ruleIndex(): number;
2127
+ enterRule(listener: FlinkSqlParserListener): void;
2128
+ exitRule(listener: FlinkSqlParserListener): void;
2129
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2130
+ }
2131
+ export declare class SelectListContext extends antlr.ParserRuleContext {
2132
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2133
+ columnProjectItem(): ColumnProjectItemContext[];
2134
+ columnProjectItem(i: number): ColumnProjectItemContext | null;
2110
2135
  COMMA(): antlr.TerminalNode[];
2111
2136
  COMMA(i: number): antlr.TerminalNode | null;
2112
2137
  get ruleIndex(): number;
@@ -2114,6 +2139,55 @@ export declare class SelectClauseContext extends antlr.ParserRuleContext {
2114
2139
  exitRule(listener: FlinkSqlParserListener): void;
2115
2140
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2116
2141
  }
2142
+ export declare class ColumnProjectItemContext extends antlr.ParserRuleContext {
2143
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2144
+ selectWindowItemColumnName(): SelectWindowItemColumnNameContext | null;
2145
+ selectLiteralColumnName(): SelectLiteralColumnNameContext | null;
2146
+ columnAlias(): ColumnAliasContext | null;
2147
+ expression(): ExpressionContext | null;
2148
+ KW_AS(): antlr.TerminalNode | null;
2149
+ tableAllColumns(): TableAllColumnsContext | null;
2150
+ selectExpressionColumnName(): SelectExpressionColumnNameContext | null;
2151
+ columnName(): ColumnNameContext | null;
2152
+ get ruleIndex(): number;
2153
+ enterRule(listener: FlinkSqlParserListener): void;
2154
+ exitRule(listener: FlinkSqlParserListener): void;
2155
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2156
+ }
2157
+ export declare class SelectWindowItemColumnNameContext extends antlr.ParserRuleContext {
2158
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2159
+ overWindowItem(): OverWindowItemContext;
2160
+ get ruleIndex(): number;
2161
+ enterRule(listener: FlinkSqlParserListener): void;
2162
+ exitRule(listener: FlinkSqlParserListener): void;
2163
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2164
+ }
2165
+ export declare class SelectExpressionColumnNameContext extends antlr.ParserRuleContext {
2166
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2167
+ expression(): ExpressionContext;
2168
+ get ruleIndex(): number;
2169
+ enterRule(listener: FlinkSqlParserListener): void;
2170
+ exitRule(listener: FlinkSqlParserListener): void;
2171
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2172
+ }
2173
+ export declare class SelectLiteralColumnNameContext extends antlr.ParserRuleContext {
2174
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2175
+ columnName(): ColumnNameContext;
2176
+ get ruleIndex(): number;
2177
+ enterRule(listener: FlinkSqlParserListener): void;
2178
+ exitRule(listener: FlinkSqlParserListener): void;
2179
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2180
+ }
2181
+ export declare class ColumnAliasContext extends antlr.ParserRuleContext {
2182
+ _alias?: IdentifierContext;
2183
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2184
+ identifier(): IdentifierContext;
2185
+ KW_AS(): antlr.TerminalNode | null;
2186
+ get ruleIndex(): number;
2187
+ enterRule(listener: FlinkSqlParserListener): void;
2188
+ exitRule(listener: FlinkSqlParserListener): void;
2189
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2190
+ }
2117
2191
  export declare class ProjectItemDefinitionContext extends antlr.ParserRuleContext {
2118
2192
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2119
2193
  overWindowItem(): OverWindowItemContext | null;
@@ -2125,7 +2199,20 @@ export declare class ProjectItemDefinitionContext extends antlr.ParserRuleContex
2125
2199
  exitRule(listener: FlinkSqlParserListener): void;
2126
2200
  accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2127
2201
  }
2202
+ export declare class TableAllColumnsContext extends antlr.ParserRuleContext {
2203
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2204
+ ASTERISK_SIGN(): antlr.TerminalNode;
2205
+ identifier(): IdentifierContext[];
2206
+ identifier(i: number): IdentifierContext | null;
2207
+ DOT(): antlr.TerminalNode[];
2208
+ DOT(i: number): antlr.TerminalNode | null;
2209
+ get ruleIndex(): number;
2210
+ enterRule(listener: FlinkSqlParserListener): void;
2211
+ exitRule(listener: FlinkSqlParserListener): void;
2212
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2213
+ }
2128
2214
  export declare class OverWindowItemContext extends antlr.ParserRuleContext {
2215
+ _alias?: IdentifierContext;
2129
2216
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2130
2217
  primaryExpression(): PrimaryExpressionContext;
2131
2218
  KW_OVER(): antlr.TerminalNode;
@@ -2186,11 +2273,31 @@ export declare class TablePrimaryContext extends antlr.ParserRuleContext {
2186
2273
  KW_TABLE(): antlr.TerminalNode | null;
2187
2274
  systemTimePeriod(): SystemTimePeriodContext | null;
2188
2275
  viewPath(): ViewPathContext | null;
2189
- KW_LATERAL(): antlr.TerminalNode | null;
2190
- LR_BRACKET(): antlr.TerminalNode | null;
2191
- functionCallExpression(): FunctionCallExpressionContext | null;
2192
- RR_BRACKET(): antlr.TerminalNode | null;
2276
+ atomFunctionTable(): AtomFunctionTableContext | null;
2277
+ atomExpressionTable(): AtomExpressionTableContext | null;
2278
+ get ruleIndex(): number;
2279
+ enterRule(listener: FlinkSqlParserListener): void;
2280
+ exitRule(listener: FlinkSqlParserListener): void;
2281
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2282
+ }
2283
+ export declare class AtomFunctionTableContext extends antlr.ParserRuleContext {
2284
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2285
+ KW_LATERAL(): antlr.TerminalNode;
2286
+ KW_TABLE(): antlr.TerminalNode;
2287
+ LR_BRACKET(): antlr.TerminalNode;
2288
+ functionCallExpression(): FunctionCallExpressionContext;
2289
+ RR_BRACKET(): antlr.TerminalNode;
2290
+ get ruleIndex(): number;
2291
+ enterRule(listener: FlinkSqlParserListener): void;
2292
+ exitRule(listener: FlinkSqlParserListener): void;
2293
+ accept<Result>(visitor: FlinkSqlParserVisitor<Result>): Result | null;
2294
+ }
2295
+ export declare class AtomExpressionTableContext extends antlr.ParserRuleContext {
2296
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2297
+ LR_BRACKET(): antlr.TerminalNode;
2193
2298
  queryStatement(): QueryStatementContext | null;
2299
+ RR_BRACKET(): antlr.TerminalNode;
2300
+ KW_LATERAL(): antlr.TerminalNode | null;
2194
2301
  KW_UNNEST(): antlr.TerminalNode | null;
2195
2302
  expression(): ExpressionContext | null;
2196
2303
  get ruleIndex(): number;