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
|
@@ -114,7 +114,10 @@ import { InlineTableContext } from "./TrinoSqlParser.js";
|
|
|
114
114
|
import { SubqueryContext } from "./TrinoSqlParser.js";
|
|
115
115
|
import { SortItemContext } from "./TrinoSqlParser.js";
|
|
116
116
|
import { QuerySpecificationContext } from "./TrinoSqlParser.js";
|
|
117
|
+
import { WhereClauseContext } from "./TrinoSqlParser.js";
|
|
118
|
+
import { HavingClauseContext } from "./TrinoSqlParser.js";
|
|
117
119
|
import { GroupByContext } from "./TrinoSqlParser.js";
|
|
120
|
+
import { PartitionByContext } from "./TrinoSqlParser.js";
|
|
118
121
|
import { SingleGroupingSetContext } from "./TrinoSqlParser.js";
|
|
119
122
|
import { RollupContext } from "./TrinoSqlParser.js";
|
|
120
123
|
import { CubeContext } from "./TrinoSqlParser.js";
|
|
@@ -135,7 +138,7 @@ import { SampledRelationContext } from "./TrinoSqlParser.js";
|
|
|
135
138
|
import { SampleTypeContext } from "./TrinoSqlParser.js";
|
|
136
139
|
import { TrimsSpecificationContext } from "./TrinoSqlParser.js";
|
|
137
140
|
import { ListAggOverflowBehaviorContext } from "./TrinoSqlParser.js";
|
|
138
|
-
import {
|
|
141
|
+
import { ListAggCountIndicationContext } from "./TrinoSqlParser.js";
|
|
139
142
|
import { PatternRecognitionContext } from "./TrinoSqlParser.js";
|
|
140
143
|
import { MeasureDefinitionContext } from "./TrinoSqlParser.js";
|
|
141
144
|
import { RowsPerMatchContext } from "./TrinoSqlParser.js";
|
|
@@ -172,7 +175,7 @@ import { TableArgumentTableContext } from "./TrinoSqlParser.js";
|
|
|
172
175
|
import { TableArgumentQueryContext } from "./TrinoSqlParser.js";
|
|
173
176
|
import { DescriptorArgumentContext } from "./TrinoSqlParser.js";
|
|
174
177
|
import { DescriptorFieldContext } from "./TrinoSqlParser.js";
|
|
175
|
-
import {
|
|
178
|
+
import { CoPartitionTablesContext } from "./TrinoSqlParser.js";
|
|
176
179
|
import { ExpressionContext } from "./TrinoSqlParser.js";
|
|
177
180
|
import { LogicalNotContext } from "./TrinoSqlParser.js";
|
|
178
181
|
import { PredicatedContext } from "./TrinoSqlParser.js";
|
|
@@ -203,6 +206,7 @@ import { TrimContext } from "./TrinoSqlParser.js";
|
|
|
203
206
|
import { ParameterContext } from "./TrinoSqlParser.js";
|
|
204
207
|
import { NormalizeContext } from "./TrinoSqlParser.js";
|
|
205
208
|
import { LocalTimestampContext } from "./TrinoSqlParser.js";
|
|
209
|
+
import { ListAggContext } from "./TrinoSqlParser.js";
|
|
206
210
|
import { JsonObjectContext } from "./TrinoSqlParser.js";
|
|
207
211
|
import { IntervalLiteralContext } from "./TrinoSqlParser.js";
|
|
208
212
|
import { NumericLiteralContext } from "./TrinoSqlParser.js";
|
|
@@ -230,7 +234,6 @@ import { CurrentTimestampContext } from "./TrinoSqlParser.js";
|
|
|
230
234
|
import { CurrentSchemaContext } from "./TrinoSqlParser.js";
|
|
231
235
|
import { ExistsContext } from "./TrinoSqlParser.js";
|
|
232
236
|
import { PositionContext } from "./TrinoSqlParser.js";
|
|
233
|
-
import { ListaggContext } from "./TrinoSqlParser.js";
|
|
234
237
|
import { SearchedCaseContext } from "./TrinoSqlParser.js";
|
|
235
238
|
import { CurrentCatalogContext } from "./TrinoSqlParser.js";
|
|
236
239
|
import { GroupingOperationContext } from "./TrinoSqlParser.js";
|
|
@@ -347,6 +350,7 @@ import { CatalogNameCreateContext } from "./TrinoSqlParser.js";
|
|
|
347
350
|
import { FunctionNameContext } from "./TrinoSqlParser.js";
|
|
348
351
|
import { FunctionNameCreateContext } from "./TrinoSqlParser.js";
|
|
349
352
|
import { ColumnRefContext } from "./TrinoSqlParser.js";
|
|
353
|
+
import { ColumnNameContext } from "./TrinoSqlParser.js";
|
|
350
354
|
import { ColumnNameCreateContext } from "./TrinoSqlParser.js";
|
|
351
355
|
import { QualifiedNameContext } from "./TrinoSqlParser.js";
|
|
352
356
|
import { QueryPeriodContext } from "./TrinoSqlParser.js";
|
|
@@ -1710,6 +1714,26 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
1710
1714
|
* @param ctx the parse tree
|
|
1711
1715
|
*/
|
|
1712
1716
|
exitQuerySpecification?: (ctx: QuerySpecificationContext) => void;
|
|
1717
|
+
/**
|
|
1718
|
+
* Enter a parse tree produced by `TrinoSqlParser.whereClause`.
|
|
1719
|
+
* @param ctx the parse tree
|
|
1720
|
+
*/
|
|
1721
|
+
enterWhereClause?: (ctx: WhereClauseContext) => void;
|
|
1722
|
+
/**
|
|
1723
|
+
* Exit a parse tree produced by `TrinoSqlParser.whereClause`.
|
|
1724
|
+
* @param ctx the parse tree
|
|
1725
|
+
*/
|
|
1726
|
+
exitWhereClause?: (ctx: WhereClauseContext) => void;
|
|
1727
|
+
/**
|
|
1728
|
+
* Enter a parse tree produced by `TrinoSqlParser.havingClause`.
|
|
1729
|
+
* @param ctx the parse tree
|
|
1730
|
+
*/
|
|
1731
|
+
enterHavingClause?: (ctx: HavingClauseContext) => void;
|
|
1732
|
+
/**
|
|
1733
|
+
* Exit a parse tree produced by `TrinoSqlParser.havingClause`.
|
|
1734
|
+
* @param ctx the parse tree
|
|
1735
|
+
*/
|
|
1736
|
+
exitHavingClause?: (ctx: HavingClauseContext) => void;
|
|
1713
1737
|
/**
|
|
1714
1738
|
* Enter a parse tree produced by `TrinoSqlParser.groupBy`.
|
|
1715
1739
|
* @param ctx the parse tree
|
|
@@ -1720,6 +1744,16 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
1720
1744
|
* @param ctx the parse tree
|
|
1721
1745
|
*/
|
|
1722
1746
|
exitGroupBy?: (ctx: GroupByContext) => void;
|
|
1747
|
+
/**
|
|
1748
|
+
* Enter a parse tree produced by `TrinoSqlParser.partitionBy`.
|
|
1749
|
+
* @param ctx the parse tree
|
|
1750
|
+
*/
|
|
1751
|
+
enterPartitionBy?: (ctx: PartitionByContext) => void;
|
|
1752
|
+
/**
|
|
1753
|
+
* Exit a parse tree produced by `TrinoSqlParser.partitionBy`.
|
|
1754
|
+
* @param ctx the parse tree
|
|
1755
|
+
*/
|
|
1756
|
+
exitPartitionBy?: (ctx: PartitionByContext) => void;
|
|
1723
1757
|
/**
|
|
1724
1758
|
* Enter a parse tree produced by the `singleGroupingSet`
|
|
1725
1759
|
* labeled alternative in `TrinoSqlParser.groupingElement`.
|
|
@@ -1937,15 +1971,15 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
1937
1971
|
*/
|
|
1938
1972
|
exitListAggOverflowBehavior?: (ctx: ListAggOverflowBehaviorContext) => void;
|
|
1939
1973
|
/**
|
|
1940
|
-
* Enter a parse tree produced by `TrinoSqlParser.
|
|
1974
|
+
* Enter a parse tree produced by `TrinoSqlParser.listAggCountIndication`.
|
|
1941
1975
|
* @param ctx the parse tree
|
|
1942
1976
|
*/
|
|
1943
|
-
|
|
1977
|
+
enterListAggCountIndication?: (ctx: ListAggCountIndicationContext) => void;
|
|
1944
1978
|
/**
|
|
1945
|
-
* Exit a parse tree produced by `TrinoSqlParser.
|
|
1979
|
+
* Exit a parse tree produced by `TrinoSqlParser.listAggCountIndication`.
|
|
1946
1980
|
* @param ctx the parse tree
|
|
1947
1981
|
*/
|
|
1948
|
-
|
|
1982
|
+
exitListAggCountIndication?: (ctx: ListAggCountIndicationContext) => void;
|
|
1949
1983
|
/**
|
|
1950
1984
|
* Enter a parse tree produced by `TrinoSqlParser.patternRecognition`.
|
|
1951
1985
|
* @param ctx the parse tree
|
|
@@ -2341,15 +2375,15 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
2341
2375
|
*/
|
|
2342
2376
|
exitDescriptorField?: (ctx: DescriptorFieldContext) => void;
|
|
2343
2377
|
/**
|
|
2344
|
-
* Enter a parse tree produced by `TrinoSqlParser.
|
|
2378
|
+
* Enter a parse tree produced by `TrinoSqlParser.coPartitionTables`.
|
|
2345
2379
|
* @param ctx the parse tree
|
|
2346
2380
|
*/
|
|
2347
|
-
|
|
2381
|
+
enterCoPartitionTables?: (ctx: CoPartitionTablesContext) => void;
|
|
2348
2382
|
/**
|
|
2349
|
-
* Exit a parse tree produced by `TrinoSqlParser.
|
|
2383
|
+
* Exit a parse tree produced by `TrinoSqlParser.coPartitionTables`.
|
|
2350
2384
|
* @param ctx the parse tree
|
|
2351
2385
|
*/
|
|
2352
|
-
|
|
2386
|
+
exitCoPartitionTables?: (ctx: CoPartitionTablesContext) => void;
|
|
2353
2387
|
/**
|
|
2354
2388
|
* Enter a parse tree produced by `TrinoSqlParser.expression`.
|
|
2355
2389
|
* @param ctx the parse tree
|
|
@@ -2708,6 +2742,18 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
2708
2742
|
* @param ctx the parse tree
|
|
2709
2743
|
*/
|
|
2710
2744
|
exitLocalTimestamp?: (ctx: LocalTimestampContext) => void;
|
|
2745
|
+
/**
|
|
2746
|
+
* Enter a parse tree produced by the `listAgg`
|
|
2747
|
+
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
2748
|
+
* @param ctx the parse tree
|
|
2749
|
+
*/
|
|
2750
|
+
enterListAgg?: (ctx: ListAggContext) => void;
|
|
2751
|
+
/**
|
|
2752
|
+
* Exit a parse tree produced by the `listAgg`
|
|
2753
|
+
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
2754
|
+
* @param ctx the parse tree
|
|
2755
|
+
*/
|
|
2756
|
+
exitListAgg?: (ctx: ListAggContext) => void;
|
|
2711
2757
|
/**
|
|
2712
2758
|
* Enter a parse tree produced by the `jsonObject`
|
|
2713
2759
|
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
@@ -3032,18 +3078,6 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
3032
3078
|
* @param ctx the parse tree
|
|
3033
3079
|
*/
|
|
3034
3080
|
exitPosition?: (ctx: PositionContext) => void;
|
|
3035
|
-
/**
|
|
3036
|
-
* Enter a parse tree produced by the `listagg`
|
|
3037
|
-
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
3038
|
-
* @param ctx the parse tree
|
|
3039
|
-
*/
|
|
3040
|
-
enterListagg?: (ctx: ListaggContext) => void;
|
|
3041
|
-
/**
|
|
3042
|
-
* Exit a parse tree produced by the `listagg`
|
|
3043
|
-
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
3044
|
-
* @param ctx the parse tree
|
|
3045
|
-
*/
|
|
3046
|
-
exitListagg?: (ctx: ListaggContext) => void;
|
|
3047
3081
|
/**
|
|
3048
3082
|
* Enter a parse tree produced by the `searchedCase`
|
|
3049
3083
|
* labeled alternative in `TrinoSqlParser.primaryExpression`.
|
|
@@ -4334,6 +4368,16 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
4334
4368
|
* @param ctx the parse tree
|
|
4335
4369
|
*/
|
|
4336
4370
|
exitColumnRef?: (ctx: ColumnRefContext) => void;
|
|
4371
|
+
/**
|
|
4372
|
+
* Enter a parse tree produced by `TrinoSqlParser.columnName`.
|
|
4373
|
+
* @param ctx the parse tree
|
|
4374
|
+
*/
|
|
4375
|
+
enterColumnName?: (ctx: ColumnNameContext) => void;
|
|
4376
|
+
/**
|
|
4377
|
+
* Exit a parse tree produced by `TrinoSqlParser.columnName`.
|
|
4378
|
+
* @param ctx the parse tree
|
|
4379
|
+
*/
|
|
4380
|
+
exitColumnName?: (ctx: ColumnNameContext) => void;
|
|
4337
4381
|
/**
|
|
4338
4382
|
* Enter a parse tree produced by `TrinoSqlParser.columnNameCreate`.
|
|
4339
4383
|
* @param ctx the parse tree
|