dt-sql-parser 4.1.2-beta.1 → 4.3.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 (83) hide show
  1. package/README.md +51 -0
  2. package/dist/lib/flink/FlinkSqlLexer.d.ts +2 -2
  3. package/dist/lib/flink/FlinkSqlLexer.js +21 -20
  4. package/dist/lib/flink/FlinkSqlParser.d.ts +178 -168
  5. package/dist/lib/flink/FlinkSqlParser.js +2799 -2741
  6. package/dist/lib/flink/FlinkSqlParserListener.d.ts +11 -0
  7. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +7 -0
  8. package/dist/lib/hive/HiveSqlParser.d.ts +241 -221
  9. package/dist/lib/hive/HiveSqlParser.js +6229 -5639
  10. package/dist/lib/hive/HiveSqlParserListener.d.ts +22 -0
  11. package/dist/lib/hive/HiveSqlParserVisitor.d.ts +14 -0
  12. package/dist/lib/impala/ImpalaSqlLexer.d.ts +2 -2
  13. package/dist/lib/impala/ImpalaSqlLexer.js +5 -5
  14. package/dist/lib/impala/ImpalaSqlParser.d.ts +147 -109
  15. package/dist/lib/impala/ImpalaSqlParser.js +3448 -3234
  16. package/dist/lib/impala/ImpalaSqlParserListener.d.ts +44 -0
  17. package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +28 -0
  18. package/dist/lib/mysql/MySqlLexer.d.ts +2 -2
  19. package/dist/lib/mysql/MySqlLexer.js +43 -43
  20. package/dist/lib/mysql/MySqlParser.d.ts +2 -2
  21. package/dist/lib/mysql/MySqlParser.js +42 -42
  22. package/dist/lib/postgresql/PostgreSqlLexer.d.ts +14 -15
  23. package/dist/lib/postgresql/PostgreSqlLexer.js +2077 -2092
  24. package/dist/lib/postgresql/PostgreSqlParser.d.ts +152 -131
  25. package/dist/lib/postgresql/PostgreSqlParser.js +10052 -9925
  26. package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +22 -0
  27. package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +14 -0
  28. package/dist/lib/spark/SparkSqlLexer.d.ts +2 -2
  29. package/dist/lib/spark/SparkSqlLexer.js +6 -6
  30. package/dist/lib/spark/SparkSqlParser.d.ts +391 -623
  31. package/dist/lib/spark/SparkSqlParser.js +6749 -8109
  32. package/dist/lib/spark/SparkSqlParserListener.d.ts +38 -326
  33. package/dist/lib/spark/SparkSqlParserVisitor.d.ts +24 -207
  34. package/dist/lib/trino/TrinoSqlLexer.d.ts +2 -2
  35. package/dist/lib/trino/TrinoSqlLexer.js +5 -5
  36. package/dist/lib/trino/TrinoSqlListener.d.ts +44 -0
  37. package/dist/lib/trino/TrinoSqlParser.d.ts +182 -153
  38. package/dist/lib/trino/TrinoSqlParser.js +4758 -4599
  39. package/dist/lib/trino/TrinoSqlVisitor.d.ts +28 -0
  40. package/dist/parser/common/basicSQL.d.ts +43 -9
  41. package/dist/parser/common/basicSQL.js +147 -40
  42. package/dist/parser/common/semanticContextCollector.d.ts +50 -0
  43. package/dist/parser/common/semanticContextCollector.js +202 -0
  44. package/dist/parser/common/tokenUtils.d.ts +12 -0
  45. package/dist/parser/common/tokenUtils.js +38 -0
  46. package/dist/parser/common/types.d.ts +30 -1
  47. package/dist/parser/common/types.js +11 -0
  48. package/dist/parser/flink/flinkErrorListener.js +14 -2
  49. package/dist/parser/flink/flinkSemanticContextCollector.d.ts +9 -0
  50. package/dist/parser/flink/flinkSemanticContextCollector.js +14 -0
  51. package/dist/parser/flink/index.d.ts +4 -2
  52. package/dist/parser/flink/index.js +32 -14
  53. package/dist/parser/hive/hiveErrorListener.js +9 -3
  54. package/dist/parser/hive/hiveSemanticContextCollector.d.ts +9 -0
  55. package/dist/parser/hive/hiveSemanticContextCollector.js +14 -0
  56. package/dist/parser/hive/index.d.ts +4 -2
  57. package/dist/parser/hive/index.js +29 -14
  58. package/dist/parser/impala/ImpalaErrorListener.js +8 -2
  59. package/dist/parser/impala/impalaSemanticContextCollector.d.ts +9 -0
  60. package/dist/parser/impala/impalaSemanticContextCollector.js +14 -0
  61. package/dist/parser/impala/index.d.ts +4 -2
  62. package/dist/parser/impala/index.js +21 -14
  63. package/dist/parser/mysql/index.d.ts +4 -2
  64. package/dist/parser/mysql/index.js +10 -14
  65. package/dist/parser/mysql/mysqlErrorListener.js +6 -2
  66. package/dist/parser/mysql/mysqlSemanticContextCollector.d.ts +9 -0
  67. package/dist/parser/mysql/mysqlSemanticContextCollector.js +14 -0
  68. package/dist/parser/postgresql/index.d.ts +4 -2
  69. package/dist/parser/postgresql/index.js +23 -14
  70. package/dist/parser/postgresql/postgreErrorListener.js +9 -3
  71. package/dist/parser/postgresql/postgreSemanticContextCollector.d.ts +9 -0
  72. package/dist/parser/postgresql/postgreSemanticContextCollector.js +14 -0
  73. package/dist/parser/spark/index.d.ts +4 -2
  74. package/dist/parser/spark/index.js +26 -14
  75. package/dist/parser/spark/sparkErrorListener.js +9 -3
  76. package/dist/parser/spark/sparkSemanticContextCollector.d.ts +9 -0
  77. package/dist/parser/spark/sparkSemanticContextCollector.js +14 -0
  78. package/dist/parser/trino/index.d.ts +4 -2
  79. package/dist/parser/trino/index.js +22 -14
  80. package/dist/parser/trino/trinoErrorListener.js +9 -3
  81. package/dist/parser/trino/trinoSemanticContextCollector.d.ts +9 -0
  82. package/dist/parser/trino/trinoSemanticContextCollector.js +14 -0
  83. package/package.json +2 -1
@@ -128,6 +128,7 @@ import { ColumnNameTypeOrConstraintListContext } from "./HiveSqlParser.js";
128
128
  import { ColumnNameColonTypeListContext } from "./HiveSqlParser.js";
129
129
  import { ColumnNameListContext } from "./HiveSqlParser.js";
130
130
  import { ColumnNameContext } from "./HiveSqlParser.js";
131
+ import { ColumnNamePathContext } from "./HiveSqlParser.js";
131
132
  import { ColumnNameCreateContext } from "./HiveSqlParser.js";
132
133
  import { ExtColumnNameContext } from "./HiveSqlParser.js";
133
134
  import { ColumnNameOrderListContext } from "./HiveSqlParser.js";
@@ -273,6 +274,7 @@ import { ExpressionsContext } from "./HiveSqlParser.js";
273
274
  import { ExpressionsInParenthesisContext } from "./HiveSqlParser.js";
274
275
  import { ExpressionsNotInParenthesisContext } from "./HiveSqlParser.js";
275
276
  import { OrderByClauseContext } from "./HiveSqlParser.js";
277
+ import { PartitionByClauseContext } from "./HiveSqlParser.js";
276
278
  import { ClusterByClauseContext } from "./HiveSqlParser.js";
277
279
  import { DistributeByClauseContext } from "./HiveSqlParser.js";
278
280
  import { SortByClauseContext } from "./HiveSqlParser.js";
@@ -1642,6 +1644,16 @@ export declare class HiveSqlParserListener implements ParseTreeListener {
1642
1644
  * @param ctx the parse tree
1643
1645
  */
1644
1646
  exitColumnName?: (ctx: ColumnNameContext) => void;
1647
+ /**
1648
+ * Enter a parse tree produced by `HiveSqlParser.columnNamePath`.
1649
+ * @param ctx the parse tree
1650
+ */
1651
+ enterColumnNamePath?: (ctx: ColumnNamePathContext) => void;
1652
+ /**
1653
+ * Exit a parse tree produced by `HiveSqlParser.columnNamePath`.
1654
+ * @param ctx the parse tree
1655
+ */
1656
+ exitColumnNamePath?: (ctx: ColumnNamePathContext) => void;
1645
1657
  /**
1646
1658
  * Enter a parse tree produced by `HiveSqlParser.columnNameCreate`.
1647
1659
  * @param ctx the parse tree
@@ -3100,6 +3112,16 @@ export declare class HiveSqlParserListener implements ParseTreeListener {
3100
3112
  * @param ctx the parse tree
3101
3113
  */
3102
3114
  exitOrderByClause?: (ctx: OrderByClauseContext) => void;
3115
+ /**
3116
+ * Enter a parse tree produced by `HiveSqlParser.partitionByClause`.
3117
+ * @param ctx the parse tree
3118
+ */
3119
+ enterPartitionByClause?: (ctx: PartitionByClauseContext) => void;
3120
+ /**
3121
+ * Exit a parse tree produced by `HiveSqlParser.partitionByClause`.
3122
+ * @param ctx the parse tree
3123
+ */
3124
+ exitPartitionByClause?: (ctx: PartitionByClauseContext) => void;
3103
3125
  /**
3104
3126
  * Enter a parse tree produced by `HiveSqlParser.clusterByClause`.
3105
3127
  * @param ctx the parse tree
@@ -128,6 +128,7 @@ import { ColumnNameTypeOrConstraintListContext } from "./HiveSqlParser.js";
128
128
  import { ColumnNameColonTypeListContext } from "./HiveSqlParser.js";
129
129
  import { ColumnNameListContext } from "./HiveSqlParser.js";
130
130
  import { ColumnNameContext } from "./HiveSqlParser.js";
131
+ import { ColumnNamePathContext } from "./HiveSqlParser.js";
131
132
  import { ColumnNameCreateContext } from "./HiveSqlParser.js";
132
133
  import { ExtColumnNameContext } from "./HiveSqlParser.js";
133
134
  import { ColumnNameOrderListContext } from "./HiveSqlParser.js";
@@ -273,6 +274,7 @@ import { ExpressionsContext } from "./HiveSqlParser.js";
273
274
  import { ExpressionsInParenthesisContext } from "./HiveSqlParser.js";
274
275
  import { ExpressionsNotInParenthesisContext } from "./HiveSqlParser.js";
275
276
  import { OrderByClauseContext } from "./HiveSqlParser.js";
277
+ import { PartitionByClauseContext } from "./HiveSqlParser.js";
276
278
  import { ClusterByClauseContext } from "./HiveSqlParser.js";
277
279
  import { DistributeByClauseContext } from "./HiveSqlParser.js";
278
280
  import { SortByClauseContext } from "./HiveSqlParser.js";
@@ -1129,6 +1131,12 @@ export declare class HiveSqlParserVisitor<Result> extends AbstractParseTreeVisit
1129
1131
  * @return the visitor result
1130
1132
  */
1131
1133
  visitColumnName?: (ctx: ColumnNameContext) => Result;
1134
+ /**
1135
+ * Visit a parse tree produced by `HiveSqlParser.columnNamePath`.
1136
+ * @param ctx the parse tree
1137
+ * @return the visitor result
1138
+ */
1139
+ visitColumnNamePath?: (ctx: ColumnNamePathContext) => Result;
1132
1140
  /**
1133
1141
  * Visit a parse tree produced by `HiveSqlParser.columnNameCreate`.
1134
1142
  * @param ctx the parse tree
@@ -2003,6 +2011,12 @@ export declare class HiveSqlParserVisitor<Result> extends AbstractParseTreeVisit
2003
2011
  * @return the visitor result
2004
2012
  */
2005
2013
  visitOrderByClause?: (ctx: OrderByClauseContext) => Result;
2014
+ /**
2015
+ * Visit a parse tree produced by `HiveSqlParser.partitionByClause`.
2016
+ * @param ctx the parse tree
2017
+ * @return the visitor result
2018
+ */
2019
+ visitPartitionByClause?: (ctx: PartitionByClauseContext) => Result;
2006
2020
  /**
2007
2021
  * Visit a parse tree produced by `HiveSqlParser.clusterByClause`.
2008
2022
  * @param ctx the parse tree
@@ -286,9 +286,9 @@ export declare class ImpalaSqlLexer extends antlr.Lexer {
286
286
  static readonly TIME_WITH_TIME_ZONE = 284;
287
287
  static readonly TIMESTAMP_WITH_TIME_ZONE = 285;
288
288
  static readonly DOUBLE_PRECISION = 286;
289
- static readonly SIMPLE_COMMENT = 287;
289
+ static readonly LINE_COMMENT = 287;
290
290
  static readonly BRACKETED_COMMENT = 288;
291
- static readonly WS = 289;
291
+ static readonly WHITE_SPACE = 289;
292
292
  static readonly channelNames: string[];
293
293
  static readonly literalNames: (string | null)[];
294
294
  static readonly symbolicNames: (string | null)[];
@@ -309,9 +309,9 @@ ImpalaSqlLexer.BACKQUOTED_IDENTIFIER = 283;
309
309
  ImpalaSqlLexer.TIME_WITH_TIME_ZONE = 284;
310
310
  ImpalaSqlLexer.TIMESTAMP_WITH_TIME_ZONE = 285;
311
311
  ImpalaSqlLexer.DOUBLE_PRECISION = 286;
312
- ImpalaSqlLexer.SIMPLE_COMMENT = 287;
312
+ ImpalaSqlLexer.LINE_COMMENT = 287;
313
313
  ImpalaSqlLexer.BRACKETED_COMMENT = 288;
314
- ImpalaSqlLexer.WS = 289;
314
+ ImpalaSqlLexer.WHITE_SPACE = 289;
315
315
  ImpalaSqlLexer.channelNames = [
316
316
  "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
317
317
  ];
@@ -421,7 +421,7 @@ ImpalaSqlLexer.symbolicNames = [
421
421
  "INTEGER_VALUE", "DECIMAL_VALUE", "DOUBLE_VALUE", "IDENTIFIER",
422
422
  "DIGIT_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER",
423
423
  "TIME_WITH_TIME_ZONE", "TIMESTAMP_WITH_TIME_ZONE", "DOUBLE_PRECISION",
424
- "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS"
424
+ "LINE_COMMENT", "BRACKETED_COMMENT", "WHITE_SPACE"
425
425
  ];
426
426
  ImpalaSqlLexer.modeNames = [
427
427
  "DEFAULT_MODE",
@@ -482,8 +482,8 @@ ImpalaSqlLexer.ruleNames = [
482
482
  "INTEGER_VALUE", "DECIMAL_VALUE", "DOUBLE_VALUE", "IDENTIFIER",
483
483
  "DIGIT_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER",
484
484
  "TIME_WITH_TIME_ZONE", "TIMESTAMP_WITH_TIME_ZONE", "DOUBLE_PRECISION",
485
- "EXPONENT", "DIGIT", "LETTER", "SIMPLE_COMMENT", "BRACKETED_COMMENT",
486
- "WS",
485
+ "EXPONENT", "DIGIT", "LETTER", "LINE_COMMENT", "BRACKETED_COMMENT",
486
+ "WHITE_SPACE",
487
487
  ];
488
488
  ImpalaSqlLexer._serializedATN = [
489
489
  4, 0, 289, 2741, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7,
@@ -290,9 +290,9 @@ export declare class ImpalaSqlParser extends SQLParserBase {
290
290
  static readonly TIME_WITH_TIME_ZONE = 284;
291
291
  static readonly TIMESTAMP_WITH_TIME_ZONE = 285;
292
292
  static readonly DOUBLE_PRECISION = 286;
293
- static readonly SIMPLE_COMMENT = 287;
293
+ static readonly LINE_COMMENT = 287;
294
294
  static readonly BRACKETED_COMMENT = 288;
295
- static readonly WS = 289;
295
+ static readonly WHITE_SPACE = 289;
296
296
  static readonly RULE_program = 0;
297
297
  static readonly RULE_singleStatement = 1;
298
298
  static readonly RULE_sqlStatement = 2;
@@ -390,94 +390,98 @@ export declare class ImpalaSqlParser extends SQLParserBase {
390
390
  static readonly RULE_viewNamePath = 94;
391
391
  static readonly RULE_functionNamePath = 95;
392
392
  static readonly RULE_columnNamePath = 96;
393
- static readonly RULE_tableOrViewPath = 97;
394
- static readonly RULE_createCommonItem = 98;
395
- static readonly RULE_assignmentList = 99;
396
- static readonly RULE_assignmentItem = 100;
397
- static readonly RULE_viewColumns = 101;
398
- static readonly RULE_viewColumnItem = 102;
399
- static readonly RULE_queryStatement = 103;
400
- static readonly RULE_with = 104;
401
- static readonly RULE_constraintSpecification = 105;
402
- static readonly RULE_foreignKeySpecification = 106;
403
- static readonly RULE_columnSpec = 107;
404
- static readonly RULE_columnDefinition = 108;
405
- static readonly RULE_kuduTableElement = 109;
406
- static readonly RULE_kuduColumnDefinition = 110;
407
- static readonly RULE_commentClause = 111;
408
- static readonly RULE_columnSpecWithKudu = 112;
409
- static readonly RULE_createColumnSpecWithKudu = 113;
410
- static readonly RULE_kuduAttributes = 114;
411
- static readonly RULE_kuduStorageAttr = 115;
412
- static readonly RULE_statsKey = 116;
413
- static readonly RULE_fileFormat = 117;
414
- static readonly RULE_kuduPartitionClause = 118;
415
- static readonly RULE_hashClause = 119;
416
- static readonly RULE_rangeClause = 120;
417
- static readonly RULE_kuduPartitionSpec = 121;
418
- static readonly RULE_cacheSpec = 122;
419
- static readonly RULE_rangeOperator = 123;
420
- static readonly RULE_partitionCol = 124;
421
- static readonly RULE_likeClause = 125;
422
- static readonly RULE_properties = 126;
423
- static readonly RULE_partitionedBy = 127;
424
- static readonly RULE_sortedBy = 128;
425
- static readonly RULE_rowFormat = 129;
426
- static readonly RULE_property = 130;
427
- static readonly RULE_queryNoWith = 131;
428
- static readonly RULE_queryTerm = 132;
429
- static readonly RULE_queryPrimary = 133;
430
- static readonly RULE_sortItem = 134;
431
- static readonly RULE_querySpecification = 135;
432
- static readonly RULE_groupBy = 136;
433
- static readonly RULE_groupingElement = 137;
434
- static readonly RULE_groupingSet = 138;
435
- static readonly RULE_namedQuery = 139;
436
- static readonly RULE_setQuantifier = 140;
437
- static readonly RULE_selectItem = 141;
438
- static readonly RULE_relation = 142;
439
- static readonly RULE_joinType = 143;
440
- static readonly RULE_joinCriteria = 144;
441
- static readonly RULE_sampledRelation = 145;
442
- static readonly RULE_sampleType = 146;
443
- static readonly RULE_aliasedRelation = 147;
444
- static readonly RULE_columnAliases = 148;
445
- static readonly RULE_relationPrimary = 149;
446
- static readonly RULE_subQueryRelation = 150;
447
- static readonly RULE_unnest = 151;
448
- static readonly RULE_parenthesizedRelation = 152;
449
- static readonly RULE_columnItem = 153;
450
- static readonly RULE_expression = 154;
451
- static readonly RULE_booleanExpression = 155;
452
- static readonly RULE_predicate = 156;
453
- static readonly RULE_valueExpression = 157;
454
- static readonly RULE_primaryExpression = 158;
455
- static readonly RULE_stringLiteral = 159;
456
- static readonly RULE_comparisonOperator = 160;
457
- static readonly RULE_comparisonQuantifier = 161;
458
- static readonly RULE_booleanValue = 162;
459
- static readonly RULE_interval = 163;
460
- static readonly RULE_intervalField = 164;
461
- static readonly RULE_normalForm = 165;
462
- static readonly RULE_type = 166;
463
- static readonly RULE_dataType = 167;
464
- static readonly RULE_typeParameter = 168;
465
- static readonly RULE_baseType = 169;
466
- static readonly RULE_whenClause = 170;
467
- static readonly RULE_filter = 171;
468
- static readonly RULE_over = 172;
469
- static readonly RULE_windowFrame = 173;
470
- static readonly RULE_frameBound = 174;
471
- static readonly RULE_pathElement = 175;
472
- static readonly RULE_pathSpecification = 176;
473
- static readonly RULE_privilege = 177;
474
- static readonly RULE_objectType = 178;
475
- static readonly RULE_qualifiedName = 179;
476
- static readonly RULE_principal = 180;
477
- static readonly RULE_identifier = 181;
478
- static readonly RULE_number = 182;
479
- static readonly RULE_reservedKeywordsUsedAsFuncName = 183;
480
- static readonly RULE_nonReserved = 184;
393
+ static readonly RULE_columnName = 97;
394
+ static readonly RULE_tableOrViewPath = 98;
395
+ static readonly RULE_createCommonItem = 99;
396
+ static readonly RULE_assignmentList = 100;
397
+ static readonly RULE_assignmentItem = 101;
398
+ static readonly RULE_viewColumns = 102;
399
+ static readonly RULE_viewColumnItem = 103;
400
+ static readonly RULE_queryStatement = 104;
401
+ static readonly RULE_with = 105;
402
+ static readonly RULE_constraintSpecification = 106;
403
+ static readonly RULE_foreignKeySpecification = 107;
404
+ static readonly RULE_columnSpec = 108;
405
+ static readonly RULE_columnDefinition = 109;
406
+ static readonly RULE_kuduTableElement = 110;
407
+ static readonly RULE_kuduColumnDefinition = 111;
408
+ static readonly RULE_commentClause = 112;
409
+ static readonly RULE_columnSpecWithKudu = 113;
410
+ static readonly RULE_createColumnSpecWithKudu = 114;
411
+ static readonly RULE_kuduAttributes = 115;
412
+ static readonly RULE_kuduStorageAttr = 116;
413
+ static readonly RULE_statsKey = 117;
414
+ static readonly RULE_fileFormat = 118;
415
+ static readonly RULE_kuduPartitionClause = 119;
416
+ static readonly RULE_hashClause = 120;
417
+ static readonly RULE_rangeClause = 121;
418
+ static readonly RULE_kuduPartitionSpec = 122;
419
+ static readonly RULE_cacheSpec = 123;
420
+ static readonly RULE_rangeOperator = 124;
421
+ static readonly RULE_partitionCol = 125;
422
+ static readonly RULE_likeClause = 126;
423
+ static readonly RULE_properties = 127;
424
+ static readonly RULE_partitionedBy = 128;
425
+ static readonly RULE_sortedBy = 129;
426
+ static readonly RULE_rowFormat = 130;
427
+ static readonly RULE_property = 131;
428
+ static readonly RULE_queryNoWith = 132;
429
+ static readonly RULE_queryTerm = 133;
430
+ static readonly RULE_queryPrimary = 134;
431
+ static readonly RULE_sortItem = 135;
432
+ static readonly RULE_querySpecification = 136;
433
+ static readonly RULE_whereClause = 137;
434
+ static readonly RULE_havingClause = 138;
435
+ static readonly RULE_groupBy = 139;
436
+ static readonly RULE_groupingElement = 140;
437
+ static readonly RULE_groupingSet = 141;
438
+ static readonly RULE_namedQuery = 142;
439
+ static readonly RULE_setQuantifier = 143;
440
+ static readonly RULE_selectItem = 144;
441
+ static readonly RULE_relation = 145;
442
+ static readonly RULE_joinType = 146;
443
+ static readonly RULE_joinCriteria = 147;
444
+ static readonly RULE_sampledRelation = 148;
445
+ static readonly RULE_sampleType = 149;
446
+ static readonly RULE_aliasedRelation = 150;
447
+ static readonly RULE_columnAliases = 151;
448
+ static readonly RULE_relationPrimary = 152;
449
+ static readonly RULE_subQueryRelation = 153;
450
+ static readonly RULE_unnest = 154;
451
+ static readonly RULE_parenthesizedRelation = 155;
452
+ static readonly RULE_columnItem = 156;
453
+ static readonly RULE_expression = 157;
454
+ static readonly RULE_booleanExpression = 158;
455
+ static readonly RULE_predicate = 159;
456
+ static readonly RULE_valueExpression = 160;
457
+ static readonly RULE_primaryExpression = 161;
458
+ static readonly RULE_stringLiteral = 162;
459
+ static readonly RULE_comparisonOperator = 163;
460
+ static readonly RULE_comparisonQuantifier = 164;
461
+ static readonly RULE_booleanValue = 165;
462
+ static readonly RULE_interval = 166;
463
+ static readonly RULE_intervalField = 167;
464
+ static readonly RULE_normalForm = 168;
465
+ static readonly RULE_type = 169;
466
+ static readonly RULE_dataType = 170;
467
+ static readonly RULE_typeParameter = 171;
468
+ static readonly RULE_baseType = 172;
469
+ static readonly RULE_whenClause = 173;
470
+ static readonly RULE_filter = 174;
471
+ static readonly RULE_partitionByClause = 175;
472
+ static readonly RULE_over = 176;
473
+ static readonly RULE_windowFrame = 177;
474
+ static readonly RULE_frameBound = 178;
475
+ static readonly RULE_pathElement = 179;
476
+ static readonly RULE_pathSpecification = 180;
477
+ static readonly RULE_privilege = 181;
478
+ static readonly RULE_objectType = 182;
479
+ static readonly RULE_qualifiedName = 183;
480
+ static readonly RULE_principal = 184;
481
+ static readonly RULE_identifier = 185;
482
+ static readonly RULE_number = 186;
483
+ static readonly RULE_reservedKeywordsUsedAsFuncName = 187;
484
+ static readonly RULE_nonReserved = 188;
481
485
  static readonly literalNames: (string | null)[];
482
486
  static readonly symbolicNames: (string | null)[];
483
487
  static readonly ruleNames: string[];
@@ -585,6 +589,7 @@ export declare class ImpalaSqlParser extends SQLParserBase {
585
589
  viewNamePath(): ViewNamePathContext;
586
590
  functionNamePath(): FunctionNamePathContext;
587
591
  columnNamePath(): ColumnNamePathContext;
592
+ columnName(): ColumnNameContext;
588
593
  tableOrViewPath(): TableOrViewPathContext;
589
594
  createCommonItem(): CreateCommonItemContext;
590
595
  assignmentList(): AssignmentListContext;
@@ -625,6 +630,8 @@ export declare class ImpalaSqlParser extends SQLParserBase {
625
630
  queryPrimary(): QueryPrimaryContext;
626
631
  sortItem(): SortItemContext;
627
632
  querySpecification(): QuerySpecificationContext;
633
+ whereClause(): WhereClauseContext;
634
+ havingClause(): HavingClauseContext;
628
635
  groupBy(): GroupByContext;
629
636
  groupingElement(): GroupingElementContext;
630
637
  groupingSet(): GroupingSetContext;
@@ -666,6 +673,7 @@ export declare class ImpalaSqlParser extends SQLParserBase {
666
673
  baseType(): BaseTypeContext;
667
674
  whenClause(): WhenClauseContext;
668
675
  filter(): FilterContext;
676
+ partitionByClause(): PartitionByClauseContext;
669
677
  over(): OverContext;
670
678
  windowFrame(): WindowFrameContext;
671
679
  frameBound(): FrameBoundContext;
@@ -1545,8 +1553,7 @@ export declare class DeleteContext extends antlr.ParserRuleContext {
1545
1553
  KW_DELETE(): antlr.TerminalNode;
1546
1554
  tableNamePath(): TableNamePathContext;
1547
1555
  KW_FROM(): antlr.TerminalNode | null;
1548
- KW_WHERE(): antlr.TerminalNode | null;
1549
- booleanExpression(): BooleanExpressionContext | null;
1556
+ whereClause(): WhereClauseContext | null;
1550
1557
  get ruleIndex(): number;
1551
1558
  enterRule(listener: ImpalaSqlParserListener): void;
1552
1559
  exitRule(listener: ImpalaSqlParserListener): void;
@@ -1560,8 +1567,7 @@ export declare class DeleteTableRefContext extends antlr.ParserRuleContext {
1560
1567
  identifier(): IdentifierContext | null;
1561
1568
  relation(): RelationContext[];
1562
1569
  relation(i: number): RelationContext | null;
1563
- KW_WHERE(): antlr.TerminalNode | null;
1564
- booleanExpression(): BooleanExpressionContext | null;
1570
+ whereClause(): WhereClauseContext | null;
1565
1571
  KW_AS(): antlr.TerminalNode | null;
1566
1572
  COMMA(): antlr.TerminalNode[];
1567
1573
  COMMA(i: number): antlr.TerminalNode | null;
@@ -1579,8 +1585,7 @@ export declare class UpdateStatementContext extends antlr.ParserRuleContext {
1579
1585
  KW_FROM(): antlr.TerminalNode | null;
1580
1586
  relation(): RelationContext[];
1581
1587
  relation(i: number): RelationContext | null;
1582
- KW_WHERE(): antlr.TerminalNode | null;
1583
- booleanExpression(): BooleanExpressionContext | null;
1588
+ whereClause(): WhereClauseContext | null;
1584
1589
  COMMA(): antlr.TerminalNode[];
1585
1590
  COMMA(i: number): antlr.TerminalNode | null;
1586
1591
  get ruleIndex(): number;
@@ -2103,6 +2108,14 @@ export declare class ColumnNamePathContext extends antlr.ParserRuleContext {
2103
2108
  exitRule(listener: ImpalaSqlParserListener): void;
2104
2109
  accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
2105
2110
  }
2111
+ export declare class ColumnNameContext extends antlr.ParserRuleContext {
2112
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2113
+ qualifiedName(): QualifiedNameContext;
2114
+ get ruleIndex(): number;
2115
+ enterRule(listener: ImpalaSqlParserListener): void;
2116
+ exitRule(listener: ImpalaSqlParserListener): void;
2117
+ accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
2118
+ }
2106
2119
  export declare class TableOrViewPathContext extends antlr.ParserRuleContext {
2107
2120
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2108
2121
  tableNamePath(): TableNamePathContext | null;
@@ -2645,8 +2658,6 @@ export declare class SortItemContext extends antlr.ParserRuleContext {
2645
2658
  accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
2646
2659
  }
2647
2660
  export declare class QuerySpecificationContext extends antlr.ParserRuleContext {
2648
- _where?: BooleanExpressionContext;
2649
- _having?: BooleanExpressionContext;
2650
2661
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2651
2662
  KW_SELECT(): antlr.TerminalNode;
2652
2663
  selectItem(): SelectItemContext[];
@@ -2658,13 +2669,31 @@ export declare class QuerySpecificationContext extends antlr.ParserRuleContext {
2658
2669
  KW_FROM(): antlr.TerminalNode | null;
2659
2670
  relation(): RelationContext[];
2660
2671
  relation(i: number): RelationContext | null;
2661
- KW_WHERE(): antlr.TerminalNode | null;
2672
+ whereClause(): WhereClauseContext | null;
2662
2673
  KW_GROUP(): antlr.TerminalNode | null;
2663
2674
  KW_BY(): antlr.TerminalNode | null;
2664
2675
  groupBy(): GroupByContext | null;
2665
- KW_HAVING(): antlr.TerminalNode | null;
2666
- booleanExpression(): BooleanExpressionContext[];
2667
- booleanExpression(i: number): BooleanExpressionContext | null;
2676
+ havingClause(): HavingClauseContext | null;
2677
+ get ruleIndex(): number;
2678
+ enterRule(listener: ImpalaSqlParserListener): void;
2679
+ exitRule(listener: ImpalaSqlParserListener): void;
2680
+ accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
2681
+ }
2682
+ export declare class WhereClauseContext extends antlr.ParserRuleContext {
2683
+ _where?: BooleanExpressionContext;
2684
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2685
+ KW_WHERE(): antlr.TerminalNode;
2686
+ booleanExpression(): BooleanExpressionContext;
2687
+ get ruleIndex(): number;
2688
+ enterRule(listener: ImpalaSqlParserListener): void;
2689
+ exitRule(listener: ImpalaSqlParserListener): void;
2690
+ accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
2691
+ }
2692
+ export declare class HavingClauseContext extends antlr.ParserRuleContext {
2693
+ _having?: BooleanExpressionContext;
2694
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
2695
+ KW_HAVING(): antlr.TerminalNode;
2696
+ booleanExpression(): BooleanExpressionContext;
2668
2697
  get ruleIndex(): number;
2669
2698
  enterRule(listener: ImpalaSqlParserListener): void;
2670
2699
  exitRule(listener: ImpalaSqlParserListener): void;
@@ -3273,7 +3302,7 @@ export declare class SimpleCaseContext extends PrimaryExpressionContext {
3273
3302
  }
3274
3303
  export declare class ColumnReferenceContext extends PrimaryExpressionContext {
3275
3304
  constructor(ctx: PrimaryExpressionContext);
3276
- identifier(): IdentifierContext;
3305
+ columnName(): ColumnNameContext;
3277
3306
  enterRule(listener: ImpalaSqlParserListener): void;
3278
3307
  exitRule(listener: ImpalaSqlParserListener): void;
3279
3308
  accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
@@ -3622,17 +3651,27 @@ export declare class FilterContext extends antlr.ParserRuleContext {
3622
3651
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3623
3652
  KW_FILTER(): antlr.TerminalNode;
3624
3653
  LPAREN(): antlr.TerminalNode;
3625
- KW_WHERE(): antlr.TerminalNode;
3626
- booleanExpression(): BooleanExpressionContext;
3654
+ whereClause(): WhereClauseContext;
3627
3655
  RPAREN(): antlr.TerminalNode;
3628
3656
  get ruleIndex(): number;
3629
3657
  enterRule(listener: ImpalaSqlParserListener): void;
3630
3658
  exitRule(listener: ImpalaSqlParserListener): void;
3631
3659
  accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
3632
3660
  }
3633
- export declare class OverContext extends antlr.ParserRuleContext {
3661
+ export declare class PartitionByClauseContext extends antlr.ParserRuleContext {
3634
3662
  _expression?: ExpressionContext;
3635
3663
  _partition: ExpressionContext[];
3664
+ constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3665
+ expression(): ExpressionContext[];
3666
+ expression(i: number): ExpressionContext | null;
3667
+ COMMA(): antlr.TerminalNode[];
3668
+ COMMA(i: number): antlr.TerminalNode | null;
3669
+ get ruleIndex(): number;
3670
+ enterRule(listener: ImpalaSqlParserListener): void;
3671
+ exitRule(listener: ImpalaSqlParserListener): void;
3672
+ accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
3673
+ }
3674
+ export declare class OverContext extends antlr.ParserRuleContext {
3636
3675
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3637
3676
  KW_OVER(): antlr.TerminalNode;
3638
3677
  LPAREN(): antlr.TerminalNode;
@@ -3640,12 +3679,11 @@ export declare class OverContext extends antlr.ParserRuleContext {
3640
3679
  KW_PARTITION(): antlr.TerminalNode | null;
3641
3680
  KW_BY(): antlr.TerminalNode[];
3642
3681
  KW_BY(i: number): antlr.TerminalNode | null;
3682
+ partitionByClause(): PartitionByClauseContext | null;
3643
3683
  KW_ORDER(): antlr.TerminalNode | null;
3644
3684
  sortItem(): SortItemContext[];
3645
3685
  sortItem(i: number): SortItemContext | null;
3646
3686
  windowFrame(): WindowFrameContext | null;
3647
- expression(): ExpressionContext[];
3648
- expression(i: number): ExpressionContext | null;
3649
3687
  COMMA(): antlr.TerminalNode[];
3650
3688
  COMMA(i: number): antlr.TerminalNode | null;
3651
3689
  get ruleIndex(): number;
@@ -3735,7 +3773,7 @@ export declare class PathSpecificationContext extends antlr.ParserRuleContext {
3735
3773
  accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
3736
3774
  }
3737
3775
  export declare class PrivilegeContext extends antlr.ParserRuleContext {
3738
- _columnName?: IdentifierContext;
3776
+ _name?: IdentifierContext;
3739
3777
  constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
3740
3778
  KW_ALL(): antlr.TerminalNode | null;
3741
3779
  KW_ALTER(): antlr.TerminalNode | null;