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
@@ -373,132 +373,138 @@ export declare class TrinoSqlParser extends SQLParserBase {
373
373
  static readonly RULE_querySpecification = 26;
374
374
  static readonly RULE_whereClause = 27;
375
375
  static readonly RULE_havingClause = 28;
376
- static readonly RULE_groupBy = 29;
377
- static readonly RULE_partitionBy = 30;
378
- static readonly RULE_groupingElement = 31;
379
- static readonly RULE_groupingSet = 32;
380
- static readonly RULE_groupingTerm = 33;
381
- static readonly RULE_windowDefinition = 34;
382
- static readonly RULE_windowSpecification = 35;
383
- static readonly RULE_namedQuery = 36;
384
- static readonly RULE_setQuantifier = 37;
385
- static readonly RULE_selectItem = 38;
386
- static readonly RULE_relation = 39;
387
- static readonly RULE_joinType = 40;
388
- static readonly RULE_joinCriteria = 41;
389
- static readonly RULE_sampledRelation = 42;
390
- static readonly RULE_sampleType = 43;
391
- static readonly RULE_trimsSpecification = 44;
392
- static readonly RULE_listAggOverflowBehavior = 45;
393
- static readonly RULE_listAggCountIndication = 46;
394
- static readonly RULE_patternRecognition = 47;
395
- static readonly RULE_measureDefinition = 48;
396
- static readonly RULE_rowsPerMatch = 49;
397
- static readonly RULE_emptyMatchHandling = 50;
398
- static readonly RULE_skipTo = 51;
399
- static readonly RULE_subsetDefinition = 52;
400
- static readonly RULE_variableDefinition = 53;
401
- static readonly RULE_aliasedRelation = 54;
402
- static readonly RULE_columnListCreate = 55;
403
- static readonly RULE_columnList = 56;
404
- static readonly RULE_columnAliases = 57;
405
- static readonly RULE_relationPrimary = 58;
406
- static readonly RULE_jsonTableColumn = 59;
407
- static readonly RULE_jsonTableSpecificPlan = 60;
408
- static readonly RULE_jsonTablePathName = 61;
409
- static readonly RULE_planPrimary = 62;
410
- static readonly RULE_jsonTableDefaultPlan = 63;
411
- static readonly RULE_tableFunctionCall = 64;
412
- static readonly RULE_tableFunctionArgument = 65;
413
- static readonly RULE_tableArgument = 66;
414
- static readonly RULE_tableArgumentRelation = 67;
415
- static readonly RULE_descriptorArgument = 68;
416
- static readonly RULE_descriptorField = 69;
417
- static readonly RULE_coPartitionTables = 70;
418
- static readonly RULE_expression = 71;
419
- static readonly RULE_booleanExpression = 72;
420
- static readonly RULE_predicate = 73;
421
- static readonly RULE_valueExpression = 74;
422
- static readonly RULE_primaryExpression = 75;
423
- static readonly RULE_jsonPathInvocation = 76;
424
- static readonly RULE_jsonValueExpression = 77;
425
- static readonly RULE_jsonRepresentation = 78;
426
- static readonly RULE_jsonArgument = 79;
427
- static readonly RULE_jsonExistsErrorBehavior = 80;
428
- static readonly RULE_jsonValueBehavior = 81;
429
- static readonly RULE_jsonQueryWrapperBehavior = 82;
430
- static readonly RULE_jsonQueryBehavior = 83;
431
- static readonly RULE_jsonObjectMember = 84;
432
- static readonly RULE_processingMode = 85;
433
- static readonly RULE_nullTreatment = 86;
434
- static readonly RULE_string = 87;
435
- static readonly RULE_timeZoneSpecifier = 88;
436
- static readonly RULE_comparisonOperator = 89;
437
- static readonly RULE_comparisonQuantifier = 90;
438
- static readonly RULE_booleanValue = 91;
439
- static readonly RULE_interval = 92;
440
- static readonly RULE_intervalField = 93;
441
- static readonly RULE_normalForm = 94;
442
- static readonly RULE_type = 95;
443
- static readonly RULE_rowField = 96;
444
- static readonly RULE_typeParameter = 97;
445
- static readonly RULE_whenClause = 98;
446
- static readonly RULE_filter = 99;
447
- static readonly RULE_mergeCase = 100;
448
- static readonly RULE_over = 101;
449
- static readonly RULE_windowFrame = 102;
450
- static readonly RULE_frameExtent = 103;
451
- static readonly RULE_frameBound = 104;
452
- static readonly RULE_rowPattern = 105;
453
- static readonly RULE_patternPrimary = 106;
454
- static readonly RULE_patternQuantifier = 107;
455
- static readonly RULE_updateAssignment = 108;
456
- static readonly RULE_explainOption = 109;
457
- static readonly RULE_transactionMode = 110;
458
- static readonly RULE_levelOfIsolation = 111;
459
- static readonly RULE_callArgument = 112;
460
- static readonly RULE_pathElement = 113;
461
- static readonly RULE_pathSpecification = 114;
462
- static readonly RULE_functionSpecification = 115;
463
- static readonly RULE_functionDeclaration = 116;
464
- static readonly RULE_functionSignature = 117;
465
- static readonly RULE_parameterDeclaration = 118;
466
- static readonly RULE_returnsClause = 119;
467
- static readonly RULE_routineCharacteristic = 120;
468
- static readonly RULE_controlStatement = 121;
469
- static readonly RULE_caseStatementWhenClause = 122;
470
- static readonly RULE_elseIfClause = 123;
471
- static readonly RULE_elseClause = 124;
472
- static readonly RULE_variableDeclaration = 125;
473
- static readonly RULE_sqlStatementList = 126;
474
- static readonly RULE_privilege = 127;
475
- static readonly RULE_entityKind = 128;
476
- static readonly RULE_grantObject = 129;
477
- static readonly RULE_tableOrViewName = 130;
478
- static readonly RULE_tableRef = 131;
479
- static readonly RULE_tableNameCreate = 132;
480
- static readonly RULE_viewRef = 133;
481
- static readonly RULE_viewNameCreate = 134;
482
- static readonly RULE_schemaRef = 135;
483
- static readonly RULE_schemaNameCreate = 136;
484
- static readonly RULE_catalogRef = 137;
485
- static readonly RULE_catalogNameCreate = 138;
486
- static readonly RULE_functionName = 139;
487
- static readonly RULE_functionNameCreate = 140;
488
- static readonly RULE_columnRef = 141;
489
- static readonly RULE_columnName = 142;
490
- static readonly RULE_columnNameCreate = 143;
491
- static readonly RULE_qualifiedName = 144;
492
- static readonly RULE_queryPeriod = 145;
493
- static readonly RULE_rangeType = 146;
494
- static readonly RULE_grantor = 147;
495
- static readonly RULE_principal = 148;
496
- static readonly RULE_roles = 149;
497
- static readonly RULE_privilegeOrRole = 150;
498
- static readonly RULE_identifier = 151;
499
- static readonly RULE_number = 152;
500
- static readonly RULE_authorizationUser = 153;
501
- static readonly RULE_nonReserved = 154;
376
+ static readonly RULE_selectList = 29;
377
+ static readonly RULE_groupBy = 30;
378
+ static readonly RULE_partitionBy = 31;
379
+ static readonly RULE_groupingElement = 32;
380
+ static readonly RULE_groupingSet = 33;
381
+ static readonly RULE_groupingTerm = 34;
382
+ static readonly RULE_windowDefinition = 35;
383
+ static readonly RULE_windowSpecification = 36;
384
+ static readonly RULE_namedQuery = 37;
385
+ static readonly RULE_setQuantifier = 38;
386
+ static readonly RULE_selectItem = 39;
387
+ static readonly RULE_selectAllWithoutTable = 40;
388
+ static readonly RULE_tableAllColumns = 41;
389
+ static readonly RULE_selectLiteralColumnName = 42;
390
+ static readonly RULE_selectExpressionColumnName = 43;
391
+ static readonly RULE_relation = 44;
392
+ static readonly RULE_joinType = 45;
393
+ static readonly RULE_joinCriteria = 46;
394
+ static readonly RULE_sampledRelation = 47;
395
+ static readonly RULE_sampleType = 48;
396
+ static readonly RULE_trimsSpecification = 49;
397
+ static readonly RULE_listAggOverflowBehavior = 50;
398
+ static readonly RULE_listAggCountIndication = 51;
399
+ static readonly RULE_patternRecognition = 52;
400
+ static readonly RULE_measureDefinition = 53;
401
+ static readonly RULE_rowsPerMatch = 54;
402
+ static readonly RULE_emptyMatchHandling = 55;
403
+ static readonly RULE_skipTo = 56;
404
+ static readonly RULE_subsetDefinition = 57;
405
+ static readonly RULE_variableDefinition = 58;
406
+ static readonly RULE_aliasedRelation = 59;
407
+ static readonly RULE_columnListCreate = 60;
408
+ static readonly RULE_columnList = 61;
409
+ static readonly RULE_columnAliases = 62;
410
+ static readonly RULE_relationPrimary = 63;
411
+ static readonly RULE_relationSourceTable = 64;
412
+ static readonly RULE_jsonTableColumn = 65;
413
+ static readonly RULE_jsonTableSpecificPlan = 66;
414
+ static readonly RULE_jsonTablePathName = 67;
415
+ static readonly RULE_planPrimary = 68;
416
+ static readonly RULE_jsonTableDefaultPlan = 69;
417
+ static readonly RULE_tableFunctionCall = 70;
418
+ static readonly RULE_tableFunctionArgument = 71;
419
+ static readonly RULE_tableArgument = 72;
420
+ static readonly RULE_tableArgumentRelation = 73;
421
+ static readonly RULE_descriptorArgument = 74;
422
+ static readonly RULE_descriptorField = 75;
423
+ static readonly RULE_coPartitionTables = 76;
424
+ static readonly RULE_expression = 77;
425
+ static readonly RULE_booleanExpression = 78;
426
+ static readonly RULE_predicate = 79;
427
+ static readonly RULE_valueExpression = 80;
428
+ static readonly RULE_primaryExpression = 81;
429
+ static readonly RULE_jsonPathInvocation = 82;
430
+ static readonly RULE_jsonValueExpression = 83;
431
+ static readonly RULE_jsonRepresentation = 84;
432
+ static readonly RULE_jsonArgument = 85;
433
+ static readonly RULE_jsonExistsErrorBehavior = 86;
434
+ static readonly RULE_jsonValueBehavior = 87;
435
+ static readonly RULE_jsonQueryWrapperBehavior = 88;
436
+ static readonly RULE_jsonQueryBehavior = 89;
437
+ static readonly RULE_jsonObjectMember = 90;
438
+ static readonly RULE_processingMode = 91;
439
+ static readonly RULE_nullTreatment = 92;
440
+ static readonly RULE_string = 93;
441
+ static readonly RULE_timeZoneSpecifier = 94;
442
+ static readonly RULE_comparisonOperator = 95;
443
+ static readonly RULE_comparisonQuantifier = 96;
444
+ static readonly RULE_booleanValue = 97;
445
+ static readonly RULE_interval = 98;
446
+ static readonly RULE_intervalField = 99;
447
+ static readonly RULE_normalForm = 100;
448
+ static readonly RULE_type = 101;
449
+ static readonly RULE_rowField = 102;
450
+ static readonly RULE_typeParameter = 103;
451
+ static readonly RULE_whenClause = 104;
452
+ static readonly RULE_filter = 105;
453
+ static readonly RULE_mergeCase = 106;
454
+ static readonly RULE_over = 107;
455
+ static readonly RULE_windowFrame = 108;
456
+ static readonly RULE_frameExtent = 109;
457
+ static readonly RULE_frameBound = 110;
458
+ static readonly RULE_rowPattern = 111;
459
+ static readonly RULE_patternPrimary = 112;
460
+ static readonly RULE_patternQuantifier = 113;
461
+ static readonly RULE_updateAssignment = 114;
462
+ static readonly RULE_explainOption = 115;
463
+ static readonly RULE_transactionMode = 116;
464
+ static readonly RULE_levelOfIsolation = 117;
465
+ static readonly RULE_callArgument = 118;
466
+ static readonly RULE_pathElement = 119;
467
+ static readonly RULE_pathSpecification = 120;
468
+ static readonly RULE_functionSpecification = 121;
469
+ static readonly RULE_functionDeclaration = 122;
470
+ static readonly RULE_functionSignature = 123;
471
+ static readonly RULE_parameterDeclaration = 124;
472
+ static readonly RULE_returnsClause = 125;
473
+ static readonly RULE_routineCharacteristic = 126;
474
+ static readonly RULE_controlStatement = 127;
475
+ static readonly RULE_caseStatementWhenClause = 128;
476
+ static readonly RULE_elseIfClause = 129;
477
+ static readonly RULE_elseClause = 130;
478
+ static readonly RULE_variableDeclaration = 131;
479
+ static readonly RULE_sqlStatementList = 132;
480
+ static readonly RULE_privilege = 133;
481
+ static readonly RULE_entityKind = 134;
482
+ static readonly RULE_grantObject = 135;
483
+ static readonly RULE_tableOrViewName = 136;
484
+ static readonly RULE_tableRef = 137;
485
+ static readonly RULE_tableNameCreate = 138;
486
+ static readonly RULE_viewRef = 139;
487
+ static readonly RULE_viewNameCreate = 140;
488
+ static readonly RULE_schemaRef = 141;
489
+ static readonly RULE_schemaNameCreate = 142;
490
+ static readonly RULE_catalogRef = 143;
491
+ static readonly RULE_catalogNameCreate = 144;
492
+ static readonly RULE_functionName = 145;
493
+ static readonly RULE_functionNameCreate = 146;
494
+ static readonly RULE_columnRef = 147;
495
+ static readonly RULE_columnName = 148;
496
+ static readonly RULE_columnNameCreate = 149;
497
+ static readonly RULE_qualifiedName = 150;
498
+ static readonly RULE_queryPeriod = 151;
499
+ static readonly RULE_rangeType = 152;
500
+ static readonly RULE_grantor = 153;
501
+ static readonly RULE_principal = 154;
502
+ static readonly RULE_roles = 155;
503
+ static readonly RULE_privilegeOrRole = 156;
504
+ static readonly RULE_identifier = 157;
505
+ static readonly RULE_number = 158;
506
+ static readonly RULE_authorizationUser = 159;
507
+ static readonly RULE_nonReserved = 160;
502
508
  static readonly literalNames: (string | null)[];
503
509
  static readonly symbolicNames: (string | null)[];
504
510
  static readonly ruleNames: string[];
@@ -539,6 +545,7 @@ export declare class TrinoSqlParser extends SQLParserBase {
539
545
  querySpecification(): QuerySpecificationContext;
540
546
  whereClause(): WhereClauseContext;
541
547
  havingClause(): HavingClauseContext;
548
+ selectList(): SelectListContext;
542
549
  groupBy(): GroupByContext;
543
550
  partitionBy(): PartitionByContext;
544
551
  groupingElement(): GroupingElementContext;
@@ -549,6 +556,10 @@ export declare class TrinoSqlParser extends SQLParserBase {
549
556
  namedQuery(): NamedQueryContext;
550
557
  setQuantifier(): SetQuantifierContext;
551
558
  selectItem(): SelectItemContext;
559
+ selectAllWithoutTable(): SelectAllWithoutTableContext;
560
+ tableAllColumns(): TableAllColumnsContext;
561
+ selectLiteralColumnName(): SelectLiteralColumnNameContext;
562
+ selectExpressionColumnName(): SelectExpressionColumnNameContext;
552
563
  relation(): RelationContext;
553
564
  relation(_p: number): RelationContext;
554
565
  joinType(): JoinTypeContext;
@@ -570,6 +581,7 @@ export declare class TrinoSqlParser extends SQLParserBase {
570
581
  columnList(): ColumnListContext;
571
582
  columnAliases(): ColumnAliasesContext;
572
583
  relationPrimary(): RelationPrimaryContext;
584
+ relationSourceTable(): RelationSourceTableContext;
573
585
  jsonTableColumn(): JsonTableColumnContext;
574
586
  jsonTableSpecificPlan(): JsonTableSpecificPlanContext;
575
587
  jsonTablePathName(): JsonTablePathNameContext;
@@ -2142,8 +2154,7 @@ export declare class SortItemContext extends antlr.ParserRuleContext {
2142
2154
  export declare class QuerySpecificationContext extends antlr.ParserRuleContext {
2143
2155
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2144
2156
  KW_SELECT(): antlr.TerminalNode;
2145
- selectItem(): SelectItemContext[];
2146
- selectItem(i: number): SelectItemContext | null;
2157
+ selectList(): SelectListContext;
2147
2158
  setQuantifier(): SetQuantifierContext | null;
2148
2159
  KW_FROM(): antlr.TerminalNode | null;
2149
2160
  relation(): RelationContext[];
@@ -2181,6 +2192,15 @@ export declare class HavingClauseContext extends antlr.ParserRuleContext {
2181
2192
  exitRule(listener: TrinoSqlListener): void;
2182
2193
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2183
2194
  }
2195
+ export declare class SelectListContext extends antlr.ParserRuleContext {
2196
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2197
+ selectItem(): SelectItemContext[];
2198
+ selectItem(i: number): SelectItemContext | null;
2199
+ get ruleIndex(): number;
2200
+ enterRule(listener: TrinoSqlListener): void;
2201
+ exitRule(listener: TrinoSqlListener): void;
2202
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2203
+ }
2184
2204
  export declare class GroupByContext extends antlr.ParserRuleContext {
2185
2205
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2186
2206
  groupingElement(): GroupingElementContext[];
@@ -2308,27 +2328,49 @@ export declare class SetQuantifierContext extends antlr.ParserRuleContext {
2308
2328
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2309
2329
  }
2310
2330
  export declare class SelectItemContext extends antlr.ParserRuleContext {
2331
+ _alias?: IdentifierContext;
2311
2332
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2333
+ selectLiteralColumnName(): SelectLiteralColumnNameContext | null;
2334
+ selectExpressionColumnName(): SelectExpressionColumnNameContext | null;
2335
+ identifier(): IdentifierContext | null;
2336
+ KW_AS(): antlr.TerminalNode | null;
2337
+ tableAllColumns(): TableAllColumnsContext | null;
2338
+ columnAliases(): ColumnAliasesContext | null;
2339
+ selectAllWithoutTable(): SelectAllWithoutTableContext | null;
2312
2340
  get ruleIndex(): number;
2313
- copyFrom(ctx: SelectItemContext): void;
2341
+ enterRule(listener: TrinoSqlListener): void;
2342
+ exitRule(listener: TrinoSqlListener): void;
2343
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2314
2344
  }
2315
- export declare class SelectAllContext extends SelectItemContext {
2316
- constructor(ctx: SelectItemContext);
2317
- primaryExpression(): PrimaryExpressionContext | null;
2345
+ export declare class SelectAllWithoutTableContext extends antlr.ParserRuleContext {
2346
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2318
2347
  ASTERISK(): antlr.TerminalNode;
2319
- KW_AS(): antlr.TerminalNode | null;
2320
- columnAliases(): ColumnAliasesContext | null;
2348
+ get ruleIndex(): number;
2321
2349
  enterRule(listener: TrinoSqlListener): void;
2322
2350
  exitRule(listener: TrinoSqlListener): void;
2323
2351
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2324
2352
  }
2325
- export declare class SelectSingleContext extends SelectItemContext {
2326
- _alias?: IdentifierContext;
2327
- constructor(ctx: SelectItemContext);
2328
- columnRef(): ColumnRefContext | null;
2329
- expression(): ExpressionContext | null;
2330
- identifier(): IdentifierContext | null;
2331
- KW_AS(): antlr.TerminalNode | null;
2353
+ export declare class TableAllColumnsContext extends antlr.ParserRuleContext {
2354
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2355
+ primaryExpression(): PrimaryExpressionContext;
2356
+ ASTERISK(): antlr.TerminalNode;
2357
+ get ruleIndex(): number;
2358
+ enterRule(listener: TrinoSqlListener): void;
2359
+ exitRule(listener: TrinoSqlListener): void;
2360
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2361
+ }
2362
+ export declare class SelectLiteralColumnNameContext extends antlr.ParserRuleContext {
2363
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2364
+ columnRef(): ColumnRefContext;
2365
+ get ruleIndex(): number;
2366
+ enterRule(listener: TrinoSqlListener): void;
2367
+ exitRule(listener: TrinoSqlListener): void;
2368
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2369
+ }
2370
+ export declare class SelectExpressionColumnNameContext extends antlr.ParserRuleContext {
2371
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2372
+ expression(): ExpressionContext;
2373
+ get ruleIndex(): number;
2332
2374
  enterRule(listener: TrinoSqlListener): void;
2333
2375
  exitRule(listener: TrinoSqlListener): void;
2334
2376
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
@@ -2593,15 +2635,42 @@ export declare class RelationPrimaryContext extends antlr.ParserRuleContext {
2593
2635
  get ruleIndex(): number;
2594
2636
  copyFrom(ctx: RelationPrimaryContext): void;
2595
2637
  }
2596
- export declare class SubqueryRelationContext extends RelationPrimaryContext {
2638
+ export declare class ExpressionSourceTableContext extends RelationPrimaryContext {
2597
2639
  constructor(ctx: RelationPrimaryContext);
2598
- query(): QueryContext;
2640
+ relationSourceTable(): RelationSourceTableContext;
2599
2641
  enterRule(listener: TrinoSqlListener): void;
2600
2642
  exitRule(listener: TrinoSqlListener): void;
2601
2643
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2602
2644
  }
2603
- export declare class JsonTableContext extends RelationPrimaryContext {
2645
+ export declare class ParenthesizedRelationContext extends RelationPrimaryContext {
2604
2646
  constructor(ctx: RelationPrimaryContext);
2647
+ relation(): RelationContext;
2648
+ enterRule(listener: TrinoSqlListener): void;
2649
+ exitRule(listener: TrinoSqlListener): void;
2650
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2651
+ }
2652
+ export declare class TableNameContext extends RelationPrimaryContext {
2653
+ constructor(ctx: RelationPrimaryContext);
2654
+ tableOrViewName(): TableOrViewNameContext;
2655
+ queryPeriod(): QueryPeriodContext | null;
2656
+ enterRule(listener: TrinoSqlListener): void;
2657
+ exitRule(listener: TrinoSqlListener): void;
2658
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2659
+ }
2660
+ export declare class RelationSourceTableContext extends antlr.ParserRuleContext {
2661
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2662
+ get ruleIndex(): number;
2663
+ copyFrom(ctx: RelationSourceTableContext): void;
2664
+ }
2665
+ export declare class SubqueryRelationContext extends RelationSourceTableContext {
2666
+ constructor(ctx: RelationSourceTableContext);
2667
+ query(): QueryContext;
2668
+ enterRule(listener: TrinoSqlListener): void;
2669
+ exitRule(listener: TrinoSqlListener): void;
2670
+ accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2671
+ }
2672
+ export declare class JsonTableContext extends RelationSourceTableContext {
2673
+ constructor(ctx: RelationSourceTableContext);
2605
2674
  KW_JSON_TABLE(): antlr.TerminalNode;
2606
2675
  jsonPathInvocation(): JsonPathInvocationContext;
2607
2676
  KW_COLUMNS(): antlr.TerminalNode;
@@ -2619,15 +2688,8 @@ export declare class JsonTableContext extends RelationPrimaryContext {
2619
2688
  exitRule(listener: TrinoSqlListener): void;
2620
2689
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2621
2690
  }
2622
- export declare class ParenthesizedRelationContext extends RelationPrimaryContext {
2623
- constructor(ctx: RelationPrimaryContext);
2624
- relation(): RelationContext;
2625
- enterRule(listener: TrinoSqlListener): void;
2626
- exitRule(listener: TrinoSqlListener): void;
2627
- accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2628
- }
2629
- export declare class UnnestContext extends RelationPrimaryContext {
2630
- constructor(ctx: RelationPrimaryContext);
2691
+ export declare class UnnestContext extends RelationSourceTableContext {
2692
+ constructor(ctx: RelationSourceTableContext);
2631
2693
  KW_UNNEST(): antlr.TerminalNode;
2632
2694
  expression(): ExpressionContext[];
2633
2695
  expression(i: number): ExpressionContext | null;
@@ -2637,30 +2699,22 @@ export declare class UnnestContext extends RelationPrimaryContext {
2637
2699
  exitRule(listener: TrinoSqlListener): void;
2638
2700
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2639
2701
  }
2640
- export declare class TableFunctionInvocationContext extends RelationPrimaryContext {
2641
- constructor(ctx: RelationPrimaryContext);
2702
+ export declare class TableFunctionInvocationContext extends RelationSourceTableContext {
2703
+ constructor(ctx: RelationSourceTableContext);
2642
2704
  KW_TABLE(): antlr.TerminalNode;
2643
2705
  tableFunctionCall(): TableFunctionCallContext;
2644
2706
  enterRule(listener: TrinoSqlListener): void;
2645
2707
  exitRule(listener: TrinoSqlListener): void;
2646
2708
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2647
2709
  }
2648
- export declare class LateralContext extends RelationPrimaryContext {
2649
- constructor(ctx: RelationPrimaryContext);
2710
+ export declare class LateralContext extends RelationSourceTableContext {
2711
+ constructor(ctx: RelationSourceTableContext);
2650
2712
  KW_LATERAL(): antlr.TerminalNode;
2651
2713
  query(): QueryContext;
2652
2714
  enterRule(listener: TrinoSqlListener): void;
2653
2715
  exitRule(listener: TrinoSqlListener): void;
2654
2716
  accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2655
2717
  }
2656
- export declare class TableNameContext extends RelationPrimaryContext {
2657
- constructor(ctx: RelationPrimaryContext);
2658
- tableOrViewName(): TableOrViewNameContext;
2659
- queryPeriod(): QueryPeriodContext | null;
2660
- enterRule(listener: TrinoSqlListener): void;
2661
- exitRule(listener: TrinoSqlListener): void;
2662
- accept<Result>(visitor: TrinoSqlVisitor<Result>): Result | null;
2663
- }
2664
2718
  export declare class JsonTableColumnContext extends antlr.ParserRuleContext {
2665
2719
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2666
2720
  get ruleIndex(): number;