dt-sql-parser 4.1.0-beta.8 → 4.1.1-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 (48) hide show
  1. package/README.md +0 -51
  2. package/dist/lib/flink/FlinkSqlParser.d.ts +135 -89
  3. package/dist/lib/flink/FlinkSqlParser.js +3290 -2763
  4. package/dist/lib/flink/FlinkSqlParserListener.d.ts +55 -13
  5. package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +35 -8
  6. package/dist/lib/postgresql/PostgreSqlParser.d.ts +3 -4
  7. package/dist/lib/postgresql/PostgreSqlParser.js +9175 -9197
  8. package/dist/lib/trino/TrinoSqlListener.d.ts +13 -0
  9. package/dist/lib/trino/TrinoSqlParser.d.ts +17 -4
  10. package/dist/lib/trino/TrinoSqlParser.js +1958 -1970
  11. package/dist/lib/trino/TrinoSqlVisitor.d.ts +8 -0
  12. package/dist/parser/common/basicSQL.d.ts +2 -15
  13. package/dist/parser/common/basicSQL.js +1 -15
  14. package/dist/parser/common/entityCollector.d.ts +7 -1
  15. package/dist/parser/common/entityCollector.js +20 -3
  16. package/dist/parser/common/types.d.ts +0 -25
  17. package/dist/parser/common/types.js +0 -7
  18. package/dist/parser/flink/index.d.ts +6 -8
  19. package/dist/parser/flink/index.js +12 -10
  20. package/dist/parser/hive/index.d.ts +5 -7
  21. package/dist/parser/hive/index.js +4 -8
  22. package/dist/parser/impala/index.d.ts +5 -7
  23. package/dist/parser/impala/index.js +4 -8
  24. package/dist/parser/mysql/index.d.ts +5 -7
  25. package/dist/parser/mysql/index.js +4 -8
  26. package/dist/parser/postgresql/index.d.ts +4 -6
  27. package/dist/parser/postgresql/index.js +4 -8
  28. package/dist/parser/spark/index.d.ts +7 -9
  29. package/dist/parser/spark/index.js +5 -9
  30. package/dist/parser/trino/index.d.ts +7 -9
  31. package/dist/parser/trino/index.js +5 -9
  32. package/package.json +2 -1
  33. package/dist/parser/common/semanticContextCollector.d.ts +0 -51
  34. package/dist/parser/common/semanticContextCollector.js +0 -202
  35. package/dist/parser/flink/flinkSemanticContextCollector.d.ts +0 -9
  36. package/dist/parser/flink/flinkSemanticContextCollector.js +0 -14
  37. package/dist/parser/hive/hiveSemanticContextCollector.d.ts +0 -9
  38. package/dist/parser/hive/hiveSemanticContextCollector.js +0 -14
  39. package/dist/parser/impala/impalaSemanticContextCollector.d.ts +0 -9
  40. package/dist/parser/impala/impalaSemanticContextCollector.js +0 -14
  41. package/dist/parser/mysql/mysqlSemanticContextCollector.d.ts +0 -9
  42. package/dist/parser/mysql/mysqlSemanticContextCollector.js +0 -14
  43. package/dist/parser/postgresql/postgreSemanticContextCollector.d.ts +0 -9
  44. package/dist/parser/postgresql/postgreSemanticContextCollector.js +0 -14
  45. package/dist/parser/spark/sparkSemanticContextCollector.d.ts +0 -9
  46. package/dist/parser/spark/sparkSemanticContextCollector.js +0 -14
  47. package/dist/parser/trino/trinoSemanticContextCollector.d.ts +0 -9
  48. package/dist/parser/trino/trinoSemanticContextCollector.js +0 -14
@@ -140,6 +140,7 @@ import { ValueExpressionDefaultContext } from "./FlinkSqlParser.js";
140
140
  import { ComparisonContext } from "./FlinkSqlParser.js";
141
141
  import { ArithmeticBinaryContext } from "./FlinkSqlParser.js";
142
142
  import { ArithmeticUnaryContext } from "./FlinkSqlParser.js";
143
+ import { FunctionCallExpressionContext } from "./FlinkSqlParser.js";
143
144
  import { DereferenceContext } from "./FlinkSqlParser.js";
144
145
  import { SimpleCaseContext } from "./FlinkSqlParser.js";
145
146
  import { ColumnReferenceContext } from "./FlinkSqlParser.js";
@@ -153,10 +154,11 @@ import { ParenthesizedExpressionContext } from "./FlinkSqlParser.js";
153
154
  import { FunctionCallContext } from "./FlinkSqlParser.js";
154
155
  import { SearchedCaseContext } from "./FlinkSqlParser.js";
155
156
  import { PositionContext } from "./FlinkSqlParser.js";
156
- import { DateFunctionExpressionContext } from "./FlinkSqlParser.js";
157
157
  import { FirstContext } from "./FlinkSqlParser.js";
158
158
  import { FunctionNameCreateContext } from "./FlinkSqlParser.js";
159
159
  import { FunctionNameContext } from "./FlinkSqlParser.js";
160
+ import { FunctionNameAndParamsContext } from "./FlinkSqlParser.js";
161
+ import { FunctionNameWithParamsContext } from "./FlinkSqlParser.js";
160
162
  import { FunctionParamContext } from "./FlinkSqlParser.js";
161
163
  import { DereferenceDefinitionContext } from "./FlinkSqlParser.js";
162
164
  import { CorrelationNameContext } from "./FlinkSqlParser.js";
@@ -209,6 +211,8 @@ import { SetQuantifierContext } from "./FlinkSqlParser.js";
209
211
  import { TimePointUnitContext } from "./FlinkSqlParser.js";
210
212
  import { TimeIntervalUnitContext } from "./FlinkSqlParser.js";
211
213
  import { ReservedKeywordsUsedAsFuncParamContext } from "./FlinkSqlParser.js";
214
+ import { ReservedKeywordsNoParamsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
215
+ import { ReservedKeywordsFollowParamsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
212
216
  import { ReservedKeywordsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
213
217
  import { NonReservedKeywordsContext } from "./FlinkSqlParser.js";
214
218
  /**
@@ -1648,6 +1652,16 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1648
1652
  * @param ctx the parse tree
1649
1653
  */
1650
1654
  exitArithmeticUnary?: (ctx: ArithmeticUnaryContext) => void;
1655
+ /**
1656
+ * Enter a parse tree produced by `FlinkSqlParser.functionCallExpression`.
1657
+ * @param ctx the parse tree
1658
+ */
1659
+ enterFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
1660
+ /**
1661
+ * Exit a parse tree produced by `FlinkSqlParser.functionCallExpression`.
1662
+ * @param ctx the parse tree
1663
+ */
1664
+ exitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
1651
1665
  /**
1652
1666
  * Enter a parse tree produced by the `dereference`
1653
1667
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1804,18 +1818,6 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1804
1818
  * @param ctx the parse tree
1805
1819
  */
1806
1820
  exitPosition?: (ctx: PositionContext) => void;
1807
- /**
1808
- * Enter a parse tree produced by the `dateFunctionExpression`
1809
- * labeled alternative in `FlinkSqlParser.primaryExpression`.
1810
- * @param ctx the parse tree
1811
- */
1812
- enterDateFunctionExpression?: (ctx: DateFunctionExpressionContext) => void;
1813
- /**
1814
- * Exit a parse tree produced by the `dateFunctionExpression`
1815
- * labeled alternative in `FlinkSqlParser.primaryExpression`.
1816
- * @param ctx the parse tree
1817
- */
1818
- exitDateFunctionExpression?: (ctx: DateFunctionExpressionContext) => void;
1819
1821
  /**
1820
1822
  * Enter a parse tree produced by the `first`
1821
1823
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1848,6 +1850,26 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1848
1850
  * @param ctx the parse tree
1849
1851
  */
1850
1852
  exitFunctionName?: (ctx: FunctionNameContext) => void;
1853
+ /**
1854
+ * Enter a parse tree produced by `FlinkSqlParser.functionNameAndParams`.
1855
+ * @param ctx the parse tree
1856
+ */
1857
+ enterFunctionNameAndParams?: (ctx: FunctionNameAndParamsContext) => void;
1858
+ /**
1859
+ * Exit a parse tree produced by `FlinkSqlParser.functionNameAndParams`.
1860
+ * @param ctx the parse tree
1861
+ */
1862
+ exitFunctionNameAndParams?: (ctx: FunctionNameAndParamsContext) => void;
1863
+ /**
1864
+ * Enter a parse tree produced by `FlinkSqlParser.functionNameWithParams`.
1865
+ * @param ctx the parse tree
1866
+ */
1867
+ enterFunctionNameWithParams?: (ctx: FunctionNameWithParamsContext) => void;
1868
+ /**
1869
+ * Exit a parse tree produced by `FlinkSqlParser.functionNameWithParams`.
1870
+ * @param ctx the parse tree
1871
+ */
1872
+ exitFunctionNameWithParams?: (ctx: FunctionNameWithParamsContext) => void;
1851
1873
  /**
1852
1874
  * Enter a parse tree produced by `FlinkSqlParser.functionParam`.
1853
1875
  * @param ctx the parse tree
@@ -2378,6 +2400,26 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
2378
2400
  * @param ctx the parse tree
2379
2401
  */
2380
2402
  exitReservedKeywordsUsedAsFuncParam?: (ctx: ReservedKeywordsUsedAsFuncParamContext) => void;
2403
+ /**
2404
+ * Enter a parse tree produced by `FlinkSqlParser.reservedKeywordsNoParamsUsedAsFuncName`.
2405
+ * @param ctx the parse tree
2406
+ */
2407
+ enterReservedKeywordsNoParamsUsedAsFuncName?: (ctx: ReservedKeywordsNoParamsUsedAsFuncNameContext) => void;
2408
+ /**
2409
+ * Exit a parse tree produced by `FlinkSqlParser.reservedKeywordsNoParamsUsedAsFuncName`.
2410
+ * @param ctx the parse tree
2411
+ */
2412
+ exitReservedKeywordsNoParamsUsedAsFuncName?: (ctx: ReservedKeywordsNoParamsUsedAsFuncNameContext) => void;
2413
+ /**
2414
+ * Enter a parse tree produced by `FlinkSqlParser.reservedKeywordsFollowParamsUsedAsFuncName`.
2415
+ * @param ctx the parse tree
2416
+ */
2417
+ enterReservedKeywordsFollowParamsUsedAsFuncName?: (ctx: ReservedKeywordsFollowParamsUsedAsFuncNameContext) => void;
2418
+ /**
2419
+ * Exit a parse tree produced by `FlinkSqlParser.reservedKeywordsFollowParamsUsedAsFuncName`.
2420
+ * @param ctx the parse tree
2421
+ */
2422
+ exitReservedKeywordsFollowParamsUsedAsFuncName?: (ctx: ReservedKeywordsFollowParamsUsedAsFuncNameContext) => void;
2381
2423
  /**
2382
2424
  * Enter a parse tree produced by `FlinkSqlParser.reservedKeywordsUsedAsFuncName`.
2383
2425
  * @param ctx the parse tree
@@ -140,6 +140,7 @@ import { ValueExpressionDefaultContext } from "./FlinkSqlParser.js";
140
140
  import { ComparisonContext } from "./FlinkSqlParser.js";
141
141
  import { ArithmeticBinaryContext } from "./FlinkSqlParser.js";
142
142
  import { ArithmeticUnaryContext } from "./FlinkSqlParser.js";
143
+ import { FunctionCallExpressionContext } from "./FlinkSqlParser.js";
143
144
  import { DereferenceContext } from "./FlinkSqlParser.js";
144
145
  import { SimpleCaseContext } from "./FlinkSqlParser.js";
145
146
  import { ColumnReferenceContext } from "./FlinkSqlParser.js";
@@ -153,10 +154,11 @@ import { ParenthesizedExpressionContext } from "./FlinkSqlParser.js";
153
154
  import { FunctionCallContext } from "./FlinkSqlParser.js";
154
155
  import { SearchedCaseContext } from "./FlinkSqlParser.js";
155
156
  import { PositionContext } from "./FlinkSqlParser.js";
156
- import { DateFunctionExpressionContext } from "./FlinkSqlParser.js";
157
157
  import { FirstContext } from "./FlinkSqlParser.js";
158
158
  import { FunctionNameCreateContext } from "./FlinkSqlParser.js";
159
159
  import { FunctionNameContext } from "./FlinkSqlParser.js";
160
+ import { FunctionNameAndParamsContext } from "./FlinkSqlParser.js";
161
+ import { FunctionNameWithParamsContext } from "./FlinkSqlParser.js";
160
162
  import { FunctionParamContext } from "./FlinkSqlParser.js";
161
163
  import { DereferenceDefinitionContext } from "./FlinkSqlParser.js";
162
164
  import { CorrelationNameContext } from "./FlinkSqlParser.js";
@@ -209,6 +211,8 @@ import { SetQuantifierContext } from "./FlinkSqlParser.js";
209
211
  import { TimePointUnitContext } from "./FlinkSqlParser.js";
210
212
  import { TimeIntervalUnitContext } from "./FlinkSqlParser.js";
211
213
  import { ReservedKeywordsUsedAsFuncParamContext } from "./FlinkSqlParser.js";
214
+ import { ReservedKeywordsNoParamsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
215
+ import { ReservedKeywordsFollowParamsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
212
216
  import { ReservedKeywordsUsedAsFuncNameContext } from "./FlinkSqlParser.js";
213
217
  import { NonReservedKeywordsContext } from "./FlinkSqlParser.js";
214
218
  /**
@@ -1076,6 +1080,12 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1076
1080
  * @return the visitor result
1077
1081
  */
1078
1082
  visitArithmeticUnary?: (ctx: ArithmeticUnaryContext) => Result;
1083
+ /**
1084
+ * Visit a parse tree produced by `FlinkSqlParser.functionCallExpression`.
1085
+ * @param ctx the parse tree
1086
+ * @return the visitor result
1087
+ */
1088
+ visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result;
1079
1089
  /**
1080
1090
  * Visit a parse tree produced by the `dereference`
1081
1091
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1167,13 +1177,6 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1167
1177
  * @return the visitor result
1168
1178
  */
1169
1179
  visitPosition?: (ctx: PositionContext) => Result;
1170
- /**
1171
- * Visit a parse tree produced by the `dateFunctionExpression`
1172
- * labeled alternative in `FlinkSqlParser.primaryExpression`.
1173
- * @param ctx the parse tree
1174
- * @return the visitor result
1175
- */
1176
- visitDateFunctionExpression?: (ctx: DateFunctionExpressionContext) => Result;
1177
1180
  /**
1178
1181
  * Visit a parse tree produced by the `first`
1179
1182
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1193,6 +1196,18 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1193
1196
  * @return the visitor result
1194
1197
  */
1195
1198
  visitFunctionName?: (ctx: FunctionNameContext) => Result;
1199
+ /**
1200
+ * Visit a parse tree produced by `FlinkSqlParser.functionNameAndParams`.
1201
+ * @param ctx the parse tree
1202
+ * @return the visitor result
1203
+ */
1204
+ visitFunctionNameAndParams?: (ctx: FunctionNameAndParamsContext) => Result;
1205
+ /**
1206
+ * Visit a parse tree produced by `FlinkSqlParser.functionNameWithParams`.
1207
+ * @param ctx the parse tree
1208
+ * @return the visitor result
1209
+ */
1210
+ visitFunctionNameWithParams?: (ctx: FunctionNameWithParamsContext) => Result;
1196
1211
  /**
1197
1212
  * Visit a parse tree produced by `FlinkSqlParser.functionParam`.
1198
1213
  * @param ctx the parse tree
@@ -1510,6 +1525,18 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1510
1525
  * @return the visitor result
1511
1526
  */
1512
1527
  visitReservedKeywordsUsedAsFuncParam?: (ctx: ReservedKeywordsUsedAsFuncParamContext) => Result;
1528
+ /**
1529
+ * Visit a parse tree produced by `FlinkSqlParser.reservedKeywordsNoParamsUsedAsFuncName`.
1530
+ * @param ctx the parse tree
1531
+ * @return the visitor result
1532
+ */
1533
+ visitReservedKeywordsNoParamsUsedAsFuncName?: (ctx: ReservedKeywordsNoParamsUsedAsFuncNameContext) => Result;
1534
+ /**
1535
+ * Visit a parse tree produced by `FlinkSqlParser.reservedKeywordsFollowParamsUsedAsFuncName`.
1536
+ * @param ctx the parse tree
1537
+ * @return the visitor result
1538
+ */
1539
+ visitReservedKeywordsFollowParamsUsedAsFuncName?: (ctx: ReservedKeywordsFollowParamsUsedAsFuncNameContext) => Result;
1513
1540
  /**
1514
1541
  * Visit a parse tree produced by `FlinkSqlParser.reservedKeywordsUsedAsFuncName`.
1515
1542
  * @param ctx the parse tree
@@ -2487,13 +2487,12 @@ export declare class PartitionboundspecContext extends antlr.ParserRuleContext {
2487
2487
  KW_VALUES(): antlr.TerminalNode | null;
2488
2488
  KW_WITH(): antlr.TerminalNode | null;
2489
2489
  OPEN_PAREN(): antlr.TerminalNode | null;
2490
- nonreservedword(): NonreservedwordContext[];
2491
- nonreservedword(i: number): NonreservedwordContext | null;
2490
+ KW_MODULUS(): antlr.TerminalNode | null;
2492
2491
  Integral(): antlr.TerminalNode[];
2493
2492
  Integral(i: number): antlr.TerminalNode | null;
2493
+ COMMA(): antlr.TerminalNode | null;
2494
+ KW_REMAINDER(): antlr.TerminalNode | null;
2494
2495
  CLOSE_PAREN(): antlr.TerminalNode | null;
2495
- COMMA(): antlr.TerminalNode[];
2496
- COMMA(i: number): antlr.TerminalNode | null;
2497
2496
  KW_IN(): antlr.TerminalNode | null;
2498
2497
  execute_param_clause(): Execute_param_clauseContext[];
2499
2498
  execute_param_clause(i: number): Execute_param_clauseContext | null;