dt-sql-parser 4.1.2-beta.0 → 4.2.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.
- package/README.md +51 -0
- package/dist/lib/flink/FlinkSqlLexer.d.ts +5 -5
- package/dist/lib/flink/FlinkSqlLexer.js +1991 -1992
- package/dist/lib/flink/FlinkSqlParser.d.ts +240 -230
- package/dist/lib/flink/FlinkSqlParser.js +3036 -2978
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +81 -70
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +49 -42
- package/dist/lib/hive/HiveSqlParser.d.ts +251 -231
- package/dist/lib/hive/HiveSqlParser.js +6264 -5674
- package/dist/lib/hive/HiveSqlParserListener.d.ts +32 -10
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +20 -6
- package/dist/lib/impala/ImpalaSqlLexer.d.ts +2 -2
- package/dist/lib/impala/ImpalaSqlLexer.js +587 -588
- package/dist/lib/impala/ImpalaSqlParser.d.ts +151 -113
- package/dist/lib/impala/ImpalaSqlParser.js +3464 -3250
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +49 -5
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +31 -3
- package/dist/lib/mysql/MySqlLexer.d.ts +2 -2
- package/dist/lib/mysql/MySqlLexer.js +3515 -3516
- package/dist/lib/mysql/MySqlParser.d.ts +138 -138
- package/dist/lib/mysql/MySqlParser.js +511 -511
- package/dist/lib/mysql/MySqlParserListener.d.ts +105 -105
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +63 -63
- package/dist/lib/postgresql/PostgreSqlLexer.d.ts +14 -15
- package/dist/lib/postgresql/PostgreSqlLexer.js +2077 -2092
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +2860 -2980
- package/dist/lib/postgresql/PostgreSqlParser.js +20155 -20660
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +2110 -2181
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +1261 -1301
- package/dist/lib/spark/SparkSqlLexer.d.ts +2 -2
- package/dist/lib/spark/SparkSqlLexer.js +949 -950
- package/dist/lib/spark/SparkSqlParser.d.ts +413 -645
- package/dist/lib/spark/SparkSqlParser.js +6840 -8200
- package/dist/lib/spark/SparkSqlParserListener.d.ts +68 -356
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +42 -225
- package/dist/lib/trino/TrinoSqlLexer.d.ts +2 -2
- package/dist/lib/trino/TrinoSqlLexer.js +319 -321
- package/dist/lib/trino/TrinoSqlListener.d.ts +67 -23
- package/dist/lib/trino/TrinoSqlParser.d.ts +210 -181
- package/dist/lib/trino/TrinoSqlParser.js +4854 -4695
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +42 -14
- package/dist/parser/common/basicSQL.d.ts +43 -9
- package/dist/parser/common/basicSQL.js +147 -40
- package/dist/parser/common/semanticContextCollector.d.ts +50 -0
- package/dist/parser/common/semanticContextCollector.js +202 -0
- package/dist/parser/common/tokenUtils.d.ts +12 -0
- package/dist/parser/common/tokenUtils.js +38 -0
- package/dist/parser/common/types.d.ts +25 -0
- package/dist/parser/common/types.js +7 -0
- package/dist/parser/flink/flinkErrorListener.js +14 -2
- package/dist/parser/flink/flinkSemanticContextCollector.d.ts +9 -0
- package/dist/parser/flink/flinkSemanticContextCollector.js +14 -0
- package/dist/parser/flink/index.d.ts +4 -2
- package/dist/parser/flink/index.js +22 -14
- package/dist/parser/hive/hiveErrorListener.js +9 -3
- package/dist/parser/hive/hiveSemanticContextCollector.d.ts +9 -0
- package/dist/parser/hive/hiveSemanticContextCollector.js +14 -0
- package/dist/parser/hive/index.d.ts +4 -2
- package/dist/parser/hive/index.js +29 -14
- package/dist/parser/impala/ImpalaErrorListener.js +8 -2
- package/dist/parser/impala/impalaSemanticContextCollector.d.ts +9 -0
- package/dist/parser/impala/impalaSemanticContextCollector.js +14 -0
- package/dist/parser/impala/index.d.ts +4 -2
- package/dist/parser/impala/index.js +21 -14
- package/dist/parser/mysql/index.d.ts +4 -2
- package/dist/parser/mysql/index.js +10 -14
- package/dist/parser/mysql/mysqlErrorListener.js +6 -2
- package/dist/parser/mysql/mysqlSemanticContextCollector.d.ts +9 -0
- package/dist/parser/mysql/mysqlSemanticContextCollector.js +14 -0
- package/dist/parser/postgresql/index.d.ts +4 -2
- package/dist/parser/postgresql/index.js +51 -42
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -5
- package/dist/parser/postgresql/postgreEntityCollector.js +7 -7
- package/dist/parser/postgresql/postgreErrorListener.js +36 -30
- package/dist/parser/postgresql/postgreSemanticContextCollector.d.ts +9 -0
- package/dist/parser/postgresql/postgreSemanticContextCollector.js +14 -0
- package/dist/parser/spark/index.d.ts +4 -2
- package/dist/parser/spark/index.js +26 -14
- package/dist/parser/spark/sparkErrorListener.js +9 -3
- package/dist/parser/spark/sparkSemanticContextCollector.d.ts +9 -0
- package/dist/parser/spark/sparkSemanticContextCollector.js +14 -0
- package/dist/parser/trino/index.d.ts +4 -2
- package/dist/parser/trino/index.js +22 -14
- package/dist/parser/trino/trinoErrorListener.js +9 -3
- package/dist/parser/trino/trinoSemanticContextCollector.d.ts +9 -0
- package/dist/parser/trino/trinoSemanticContextCollector.js +14 -0
- package/package.json +2 -1
|
@@ -30,7 +30,7 @@ import { AlterViewContext } from "./ImpalaSqlParser.js";
|
|
|
30
30
|
import { RenameViewContext } from "./ImpalaSqlParser.js";
|
|
31
31
|
import { AlterViewOwnerContext } from "./ImpalaSqlParser.js";
|
|
32
32
|
import { RenameTableContext } from "./ImpalaSqlParser.js";
|
|
33
|
-
import {
|
|
33
|
+
import { AlterUnSetOrSetViewTblPropertiesContext } from "./ImpalaSqlParser.js";
|
|
34
34
|
import { TruncateTableStatementContext } from "./ImpalaSqlParser.js";
|
|
35
35
|
import { DescribeStatementContext } from "./ImpalaSqlParser.js";
|
|
36
36
|
import { ComputeStatementContext } from "./ImpalaSqlParser.js";
|
|
@@ -96,6 +96,7 @@ import { TableNamePathContext } from "./ImpalaSqlParser.js";
|
|
|
96
96
|
import { ViewNamePathContext } from "./ImpalaSqlParser.js";
|
|
97
97
|
import { FunctionNamePathContext } from "./ImpalaSqlParser.js";
|
|
98
98
|
import { ColumnNamePathContext } from "./ImpalaSqlParser.js";
|
|
99
|
+
import { ColumnNameContext } from "./ImpalaSqlParser.js";
|
|
99
100
|
import { TableOrViewPathContext } from "./ImpalaSqlParser.js";
|
|
100
101
|
import { CreateCommonItemContext } from "./ImpalaSqlParser.js";
|
|
101
102
|
import { AssignmentListContext } from "./ImpalaSqlParser.js";
|
|
@@ -139,6 +140,8 @@ import { InlineTableContext } from "./ImpalaSqlParser.js";
|
|
|
139
140
|
import { SubqueryContext } from "./ImpalaSqlParser.js";
|
|
140
141
|
import { SortItemContext } from "./ImpalaSqlParser.js";
|
|
141
142
|
import { QuerySpecificationContext } from "./ImpalaSqlParser.js";
|
|
143
|
+
import { WhereClauseContext } from "./ImpalaSqlParser.js";
|
|
144
|
+
import { HavingClauseContext } from "./ImpalaSqlParser.js";
|
|
142
145
|
import { GroupByContext } from "./ImpalaSqlParser.js";
|
|
143
146
|
import { SingleGroupingSetContext } from "./ImpalaSqlParser.js";
|
|
144
147
|
import { GroupingSetContext } from "./ImpalaSqlParser.js";
|
|
@@ -219,6 +222,7 @@ import { TypeParameterContext } from "./ImpalaSqlParser.js";
|
|
|
219
222
|
import { BaseTypeContext } from "./ImpalaSqlParser.js";
|
|
220
223
|
import { WhenClauseContext } from "./ImpalaSqlParser.js";
|
|
221
224
|
import { FilterContext } from "./ImpalaSqlParser.js";
|
|
225
|
+
import { PartitionByClauseContext } from "./ImpalaSqlParser.js";
|
|
222
226
|
import { OverContext } from "./ImpalaSqlParser.js";
|
|
223
227
|
import { WindowFrameContext } from "./ImpalaSqlParser.js";
|
|
224
228
|
import { UnboundedFrameContext } from "./ImpalaSqlParser.js";
|
|
@@ -558,15 +562,15 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
|
|
|
558
562
|
*/
|
|
559
563
|
exitRenameTable?: (ctx: RenameTableContext) => void;
|
|
560
564
|
/**
|
|
561
|
-
* Enter a parse tree produced by `ImpalaSqlParser.
|
|
565
|
+
* Enter a parse tree produced by `ImpalaSqlParser.alterUnSetOrSetViewTblProperties`.
|
|
562
566
|
* @param ctx the parse tree
|
|
563
567
|
*/
|
|
564
|
-
|
|
568
|
+
enterAlterUnSetOrSetViewTblProperties?: (ctx: AlterUnSetOrSetViewTblPropertiesContext) => void;
|
|
565
569
|
/**
|
|
566
|
-
* Exit a parse tree produced by `ImpalaSqlParser.
|
|
570
|
+
* Exit a parse tree produced by `ImpalaSqlParser.alterUnSetOrSetViewTblProperties`.
|
|
567
571
|
* @param ctx the parse tree
|
|
568
572
|
*/
|
|
569
|
-
|
|
573
|
+
exitAlterUnSetOrSetViewTblProperties?: (ctx: AlterUnSetOrSetViewTblPropertiesContext) => void;
|
|
570
574
|
/**
|
|
571
575
|
* Enter a parse tree produced by `ImpalaSqlParser.truncateTableStatement`.
|
|
572
576
|
* @param ctx the parse tree
|
|
@@ -1217,6 +1221,16 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
|
|
|
1217
1221
|
* @param ctx the parse tree
|
|
1218
1222
|
*/
|
|
1219
1223
|
exitColumnNamePath?: (ctx: ColumnNamePathContext) => void;
|
|
1224
|
+
/**
|
|
1225
|
+
* Enter a parse tree produced by `ImpalaSqlParser.columnName`.
|
|
1226
|
+
* @param ctx the parse tree
|
|
1227
|
+
*/
|
|
1228
|
+
enterColumnName?: (ctx: ColumnNameContext) => void;
|
|
1229
|
+
/**
|
|
1230
|
+
* Exit a parse tree produced by `ImpalaSqlParser.columnName`.
|
|
1231
|
+
* @param ctx the parse tree
|
|
1232
|
+
*/
|
|
1233
|
+
exitColumnName?: (ctx: ColumnNameContext) => void;
|
|
1220
1234
|
/**
|
|
1221
1235
|
* Enter a parse tree produced by `ImpalaSqlParser.tableOrViewPath`.
|
|
1222
1236
|
* @param ctx the parse tree
|
|
@@ -1659,6 +1673,26 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
|
|
|
1659
1673
|
* @param ctx the parse tree
|
|
1660
1674
|
*/
|
|
1661
1675
|
exitQuerySpecification?: (ctx: QuerySpecificationContext) => void;
|
|
1676
|
+
/**
|
|
1677
|
+
* Enter a parse tree produced by `ImpalaSqlParser.whereClause`.
|
|
1678
|
+
* @param ctx the parse tree
|
|
1679
|
+
*/
|
|
1680
|
+
enterWhereClause?: (ctx: WhereClauseContext) => void;
|
|
1681
|
+
/**
|
|
1682
|
+
* Exit a parse tree produced by `ImpalaSqlParser.whereClause`.
|
|
1683
|
+
* @param ctx the parse tree
|
|
1684
|
+
*/
|
|
1685
|
+
exitWhereClause?: (ctx: WhereClauseContext) => void;
|
|
1686
|
+
/**
|
|
1687
|
+
* Enter a parse tree produced by `ImpalaSqlParser.havingClause`.
|
|
1688
|
+
* @param ctx the parse tree
|
|
1689
|
+
*/
|
|
1690
|
+
enterHavingClause?: (ctx: HavingClauseContext) => void;
|
|
1691
|
+
/**
|
|
1692
|
+
* Exit a parse tree produced by `ImpalaSqlParser.havingClause`.
|
|
1693
|
+
* @param ctx the parse tree
|
|
1694
|
+
*/
|
|
1695
|
+
exitHavingClause?: (ctx: HavingClauseContext) => void;
|
|
1662
1696
|
/**
|
|
1663
1697
|
* Enter a parse tree produced by `ImpalaSqlParser.groupBy`.
|
|
1664
1698
|
* @param ctx the parse tree
|
|
@@ -2563,6 +2597,16 @@ export declare class ImpalaSqlParserListener implements ParseTreeListener {
|
|
|
2563
2597
|
* @param ctx the parse tree
|
|
2564
2598
|
*/
|
|
2565
2599
|
exitFilter?: (ctx: FilterContext) => void;
|
|
2600
|
+
/**
|
|
2601
|
+
* Enter a parse tree produced by `ImpalaSqlParser.partitionByClause`.
|
|
2602
|
+
* @param ctx the parse tree
|
|
2603
|
+
*/
|
|
2604
|
+
enterPartitionByClause?: (ctx: PartitionByClauseContext) => void;
|
|
2605
|
+
/**
|
|
2606
|
+
* Exit a parse tree produced by `ImpalaSqlParser.partitionByClause`.
|
|
2607
|
+
* @param ctx the parse tree
|
|
2608
|
+
*/
|
|
2609
|
+
exitPartitionByClause?: (ctx: PartitionByClauseContext) => void;
|
|
2566
2610
|
/**
|
|
2567
2611
|
* Enter a parse tree produced by `ImpalaSqlParser.over`.
|
|
2568
2612
|
* @param ctx the parse tree
|
|
@@ -30,7 +30,7 @@ import { AlterViewContext } from "./ImpalaSqlParser.js";
|
|
|
30
30
|
import { RenameViewContext } from "./ImpalaSqlParser.js";
|
|
31
31
|
import { AlterViewOwnerContext } from "./ImpalaSqlParser.js";
|
|
32
32
|
import { RenameTableContext } from "./ImpalaSqlParser.js";
|
|
33
|
-
import {
|
|
33
|
+
import { AlterUnSetOrSetViewTblPropertiesContext } from "./ImpalaSqlParser.js";
|
|
34
34
|
import { TruncateTableStatementContext } from "./ImpalaSqlParser.js";
|
|
35
35
|
import { DescribeStatementContext } from "./ImpalaSqlParser.js";
|
|
36
36
|
import { ComputeStatementContext } from "./ImpalaSqlParser.js";
|
|
@@ -96,6 +96,7 @@ import { TableNamePathContext } from "./ImpalaSqlParser.js";
|
|
|
96
96
|
import { ViewNamePathContext } from "./ImpalaSqlParser.js";
|
|
97
97
|
import { FunctionNamePathContext } from "./ImpalaSqlParser.js";
|
|
98
98
|
import { ColumnNamePathContext } from "./ImpalaSqlParser.js";
|
|
99
|
+
import { ColumnNameContext } from "./ImpalaSqlParser.js";
|
|
99
100
|
import { TableOrViewPathContext } from "./ImpalaSqlParser.js";
|
|
100
101
|
import { CreateCommonItemContext } from "./ImpalaSqlParser.js";
|
|
101
102
|
import { AssignmentListContext } from "./ImpalaSqlParser.js";
|
|
@@ -139,6 +140,8 @@ import { InlineTableContext } from "./ImpalaSqlParser.js";
|
|
|
139
140
|
import { SubqueryContext } from "./ImpalaSqlParser.js";
|
|
140
141
|
import { SortItemContext } from "./ImpalaSqlParser.js";
|
|
141
142
|
import { QuerySpecificationContext } from "./ImpalaSqlParser.js";
|
|
143
|
+
import { WhereClauseContext } from "./ImpalaSqlParser.js";
|
|
144
|
+
import { HavingClauseContext } from "./ImpalaSqlParser.js";
|
|
142
145
|
import { GroupByContext } from "./ImpalaSqlParser.js";
|
|
143
146
|
import { SingleGroupingSetContext } from "./ImpalaSqlParser.js";
|
|
144
147
|
import { GroupingSetContext } from "./ImpalaSqlParser.js";
|
|
@@ -219,6 +222,7 @@ import { TypeParameterContext } from "./ImpalaSqlParser.js";
|
|
|
219
222
|
import { BaseTypeContext } from "./ImpalaSqlParser.js";
|
|
220
223
|
import { WhenClauseContext } from "./ImpalaSqlParser.js";
|
|
221
224
|
import { FilterContext } from "./ImpalaSqlParser.js";
|
|
225
|
+
import { PartitionByClauseContext } from "./ImpalaSqlParser.js";
|
|
222
226
|
import { OverContext } from "./ImpalaSqlParser.js";
|
|
223
227
|
import { WindowFrameContext } from "./ImpalaSqlParser.js";
|
|
224
228
|
import { UnboundedFrameContext } from "./ImpalaSqlParser.js";
|
|
@@ -437,11 +441,11 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
|
|
|
437
441
|
*/
|
|
438
442
|
visitRenameTable?: (ctx: RenameTableContext) => Result;
|
|
439
443
|
/**
|
|
440
|
-
* Visit a parse tree produced by `ImpalaSqlParser.
|
|
444
|
+
* Visit a parse tree produced by `ImpalaSqlParser.alterUnSetOrSetViewTblProperties`.
|
|
441
445
|
* @param ctx the parse tree
|
|
442
446
|
* @return the visitor result
|
|
443
447
|
*/
|
|
444
|
-
|
|
448
|
+
visitAlterUnSetOrSetViewTblProperties?: (ctx: AlterUnSetOrSetViewTblPropertiesContext) => Result;
|
|
445
449
|
/**
|
|
446
450
|
* Visit a parse tree produced by `ImpalaSqlParser.truncateTableStatement`.
|
|
447
451
|
* @param ctx the parse tree
|
|
@@ -832,6 +836,12 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
|
|
|
832
836
|
* @return the visitor result
|
|
833
837
|
*/
|
|
834
838
|
visitColumnNamePath?: (ctx: ColumnNamePathContext) => Result;
|
|
839
|
+
/**
|
|
840
|
+
* Visit a parse tree produced by `ImpalaSqlParser.columnName`.
|
|
841
|
+
* @param ctx the parse tree
|
|
842
|
+
* @return the visitor result
|
|
843
|
+
*/
|
|
844
|
+
visitColumnName?: (ctx: ColumnNameContext) => Result;
|
|
835
845
|
/**
|
|
836
846
|
* Visit a parse tree produced by `ImpalaSqlParser.tableOrViewPath`.
|
|
837
847
|
* @param ctx the parse tree
|
|
@@ -1096,6 +1106,18 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
|
|
|
1096
1106
|
* @return the visitor result
|
|
1097
1107
|
*/
|
|
1098
1108
|
visitQuerySpecification?: (ctx: QuerySpecificationContext) => Result;
|
|
1109
|
+
/**
|
|
1110
|
+
* Visit a parse tree produced by `ImpalaSqlParser.whereClause`.
|
|
1111
|
+
* @param ctx the parse tree
|
|
1112
|
+
* @return the visitor result
|
|
1113
|
+
*/
|
|
1114
|
+
visitWhereClause?: (ctx: WhereClauseContext) => Result;
|
|
1115
|
+
/**
|
|
1116
|
+
* Visit a parse tree produced by `ImpalaSqlParser.havingClause`.
|
|
1117
|
+
* @param ctx the parse tree
|
|
1118
|
+
* @return the visitor result
|
|
1119
|
+
*/
|
|
1120
|
+
visitHavingClause?: (ctx: HavingClauseContext) => Result;
|
|
1099
1121
|
/**
|
|
1100
1122
|
* Visit a parse tree produced by `ImpalaSqlParser.groupBy`.
|
|
1101
1123
|
* @param ctx the parse tree
|
|
@@ -1628,6 +1650,12 @@ export declare class ImpalaSqlParserVisitor<Result> extends AbstractParseTreeVis
|
|
|
1628
1650
|
* @return the visitor result
|
|
1629
1651
|
*/
|
|
1630
1652
|
visitFilter?: (ctx: FilterContext) => Result;
|
|
1653
|
+
/**
|
|
1654
|
+
* Visit a parse tree produced by `ImpalaSqlParser.partitionByClause`.
|
|
1655
|
+
* @param ctx the parse tree
|
|
1656
|
+
* @return the visitor result
|
|
1657
|
+
*/
|
|
1658
|
+
visitPartitionByClause?: (ctx: PartitionByClauseContext) => Result;
|
|
1631
1659
|
/**
|
|
1632
1660
|
* Visit a parse tree produced by `ImpalaSqlParser.over`.
|
|
1633
1661
|
* @param ctx the parse tree
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as antlr from "antlr4ng";
|
|
2
2
|
export declare class MySqlLexer extends antlr.Lexer {
|
|
3
|
-
static readonly
|
|
3
|
+
static readonly WHITE_SPACE = 1;
|
|
4
4
|
static readonly SPEC_MYSQL_COMMENT = 2;
|
|
5
|
-
static readonly
|
|
5
|
+
static readonly BRACKETED_COMMENT = 3;
|
|
6
6
|
static readonly LINE_COMMENT = 4;
|
|
7
7
|
static readonly KW_ACTIVE = 5;
|
|
8
8
|
static readonly KW_ADD = 6;
|