dt-sql-parser 4.4.0-beta.0 → 4.4.2-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.
@@ -129,6 +129,8 @@ import { AfterMatchStrategyContext } from "./FlinkSqlParser.js";
129
129
  import { PatternVariablesDefinitionContext } from "./FlinkSqlParser.js";
130
130
  import { WindowFrameContext } from "./FlinkSqlParser.js";
131
131
  import { FrameBoundContext } from "./FlinkSqlParser.js";
132
+ import { FrameStartContext } from "./FlinkSqlParser.js";
133
+ import { FrameEndContext } from "./FlinkSqlParser.js";
132
134
  import { WithinClauseContext } from "./FlinkSqlParser.js";
133
135
  import { ExpressionContext } from "./FlinkSqlParser.js";
134
136
  import { LogicalNotContext } from "./FlinkSqlParser.js";
@@ -137,6 +139,7 @@ import { ExistsContext } from "./FlinkSqlParser.js";
137
139
  import { LogicalNestedContext } from "./FlinkSqlParser.js";
138
140
  import { LogicalBinaryContext } from "./FlinkSqlParser.js";
139
141
  import { PredicateContext } from "./FlinkSqlParser.js";
142
+ import { JsonFunctionBranchContext } from "./FlinkSqlParser.js";
140
143
  import { LikePredicateContext } from "./FlinkSqlParser.js";
141
144
  import { ValueExpressionDefaultContext } from "./FlinkSqlParser.js";
142
145
  import { ComparisonContext } from "./FlinkSqlParser.js";
@@ -153,6 +156,7 @@ import { SubqueryExpressionContext } from "./FlinkSqlParser.js";
153
156
  import { CastContext } from "./FlinkSqlParser.js";
154
157
  import { ConstantDefaultContext } from "./FlinkSqlParser.js";
155
158
  import { ParenthesizedExpressionContext } from "./FlinkSqlParser.js";
159
+ import { ExtractContext } from "./FlinkSqlParser.js";
156
160
  import { FunctionCallContext } from "./FlinkSqlParser.js";
157
161
  import { SearchedCaseContext } from "./FlinkSqlParser.js";
158
162
  import { PositionContext } from "./FlinkSqlParser.js";
@@ -162,6 +166,10 @@ import { FunctionNameContext } from "./FlinkSqlParser.js";
162
166
  import { FunctionNameAndParamsContext } from "./FlinkSqlParser.js";
163
167
  import { FunctionNameWithParamsContext } from "./FlinkSqlParser.js";
164
168
  import { FunctionParamContext } from "./FlinkSqlParser.js";
169
+ import { JsonValueParamsContext } from "./FlinkSqlParser.js";
170
+ import { JsonQueryParamsContext } from "./FlinkSqlParser.js";
171
+ import { JsonObjectParamsContext } from "./FlinkSqlParser.js";
172
+ import { JsonArrayParamsContext } from "./FlinkSqlParser.js";
165
173
  import { DereferenceDefinitionContext } from "./FlinkSqlParser.js";
166
174
  import { CorrelationNameContext } from "./FlinkSqlParser.js";
167
175
  import { QualifiedNameContext } from "./FlinkSqlParser.js";
@@ -1526,6 +1534,26 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1526
1534
  * @param ctx the parse tree
1527
1535
  */
1528
1536
  exitFrameBound?: (ctx: FrameBoundContext) => void;
1537
+ /**
1538
+ * Enter a parse tree produced by `FlinkSqlParser.frameStart`.
1539
+ * @param ctx the parse tree
1540
+ */
1541
+ enterFrameStart?: (ctx: FrameStartContext) => void;
1542
+ /**
1543
+ * Exit a parse tree produced by `FlinkSqlParser.frameStart`.
1544
+ * @param ctx the parse tree
1545
+ */
1546
+ exitFrameStart?: (ctx: FrameStartContext) => void;
1547
+ /**
1548
+ * Enter a parse tree produced by `FlinkSqlParser.frameEnd`.
1549
+ * @param ctx the parse tree
1550
+ */
1551
+ enterFrameEnd?: (ctx: FrameEndContext) => void;
1552
+ /**
1553
+ * Exit a parse tree produced by `FlinkSqlParser.frameEnd`.
1554
+ * @param ctx the parse tree
1555
+ */
1556
+ exitFrameEnd?: (ctx: FrameEndContext) => void;
1529
1557
  /**
1530
1558
  * Enter a parse tree produced by `FlinkSqlParser.withinClause`.
1531
1559
  * @param ctx the parse tree
@@ -1616,6 +1644,16 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1616
1644
  * @param ctx the parse tree
1617
1645
  */
1618
1646
  exitPredicate?: (ctx: PredicateContext) => void;
1647
+ /**
1648
+ * Enter a parse tree produced by `FlinkSqlParser.jsonFunctionBranch`.
1649
+ * @param ctx the parse tree
1650
+ */
1651
+ enterJsonFunctionBranch?: (ctx: JsonFunctionBranchContext) => void;
1652
+ /**
1653
+ * Exit a parse tree produced by `FlinkSqlParser.jsonFunctionBranch`.
1654
+ * @param ctx the parse tree
1655
+ */
1656
+ exitJsonFunctionBranch?: (ctx: JsonFunctionBranchContext) => void;
1619
1657
  /**
1620
1658
  * Enter a parse tree produced by `FlinkSqlParser.likePredicate`.
1621
1659
  * @param ctx the parse tree
@@ -1804,6 +1842,18 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1804
1842
  * @param ctx the parse tree
1805
1843
  */
1806
1844
  exitParenthesizedExpression?: (ctx: ParenthesizedExpressionContext) => void;
1845
+ /**
1846
+ * Enter a parse tree produced by the `extract`
1847
+ * labeled alternative in `FlinkSqlParser.primaryExpression`.
1848
+ * @param ctx the parse tree
1849
+ */
1850
+ enterExtract?: (ctx: ExtractContext) => void;
1851
+ /**
1852
+ * Exit a parse tree produced by the `extract`
1853
+ * labeled alternative in `FlinkSqlParser.primaryExpression`.
1854
+ * @param ctx the parse tree
1855
+ */
1856
+ exitExtract?: (ctx: ExtractContext) => void;
1807
1857
  /**
1808
1858
  * Enter a parse tree produced by the `functionCall`
1809
1859
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1902,6 +1952,46 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
1902
1952
  * @param ctx the parse tree
1903
1953
  */
1904
1954
  exitFunctionParam?: (ctx: FunctionParamContext) => void;
1955
+ /**
1956
+ * Enter a parse tree produced by `FlinkSqlParser.jsonValueParams`.
1957
+ * @param ctx the parse tree
1958
+ */
1959
+ enterJsonValueParams?: (ctx: JsonValueParamsContext) => void;
1960
+ /**
1961
+ * Exit a parse tree produced by `FlinkSqlParser.jsonValueParams`.
1962
+ * @param ctx the parse tree
1963
+ */
1964
+ exitJsonValueParams?: (ctx: JsonValueParamsContext) => void;
1965
+ /**
1966
+ * Enter a parse tree produced by `FlinkSqlParser.jsonQueryParams`.
1967
+ * @param ctx the parse tree
1968
+ */
1969
+ enterJsonQueryParams?: (ctx: JsonQueryParamsContext) => void;
1970
+ /**
1971
+ * Exit a parse tree produced by `FlinkSqlParser.jsonQueryParams`.
1972
+ * @param ctx the parse tree
1973
+ */
1974
+ exitJsonQueryParams?: (ctx: JsonQueryParamsContext) => void;
1975
+ /**
1976
+ * Enter a parse tree produced by `FlinkSqlParser.jsonObjectParams`.
1977
+ * @param ctx the parse tree
1978
+ */
1979
+ enterJsonObjectParams?: (ctx: JsonObjectParamsContext) => void;
1980
+ /**
1981
+ * Exit a parse tree produced by `FlinkSqlParser.jsonObjectParams`.
1982
+ * @param ctx the parse tree
1983
+ */
1984
+ exitJsonObjectParams?: (ctx: JsonObjectParamsContext) => void;
1985
+ /**
1986
+ * Enter a parse tree produced by `FlinkSqlParser.jsonArrayParams`.
1987
+ * @param ctx the parse tree
1988
+ */
1989
+ enterJsonArrayParams?: (ctx: JsonArrayParamsContext) => void;
1990
+ /**
1991
+ * Exit a parse tree produced by `FlinkSqlParser.jsonArrayParams`.
1992
+ * @param ctx the parse tree
1993
+ */
1994
+ exitJsonArrayParams?: (ctx: JsonArrayParamsContext) => void;
1905
1995
  /**
1906
1996
  * Enter a parse tree produced by `FlinkSqlParser.dereferenceDefinition`.
1907
1997
  * @param ctx the parse tree
@@ -129,6 +129,8 @@ import { AfterMatchStrategyContext } from "./FlinkSqlParser.js";
129
129
  import { PatternVariablesDefinitionContext } from "./FlinkSqlParser.js";
130
130
  import { WindowFrameContext } from "./FlinkSqlParser.js";
131
131
  import { FrameBoundContext } from "./FlinkSqlParser.js";
132
+ import { FrameStartContext } from "./FlinkSqlParser.js";
133
+ import { FrameEndContext } from "./FlinkSqlParser.js";
132
134
  import { WithinClauseContext } from "./FlinkSqlParser.js";
133
135
  import { ExpressionContext } from "./FlinkSqlParser.js";
134
136
  import { LogicalNotContext } from "./FlinkSqlParser.js";
@@ -137,6 +139,7 @@ import { ExistsContext } from "./FlinkSqlParser.js";
137
139
  import { LogicalNestedContext } from "./FlinkSqlParser.js";
138
140
  import { LogicalBinaryContext } from "./FlinkSqlParser.js";
139
141
  import { PredicateContext } from "./FlinkSqlParser.js";
142
+ import { JsonFunctionBranchContext } from "./FlinkSqlParser.js";
140
143
  import { LikePredicateContext } from "./FlinkSqlParser.js";
141
144
  import { ValueExpressionDefaultContext } from "./FlinkSqlParser.js";
142
145
  import { ComparisonContext } from "./FlinkSqlParser.js";
@@ -153,6 +156,7 @@ import { SubqueryExpressionContext } from "./FlinkSqlParser.js";
153
156
  import { CastContext } from "./FlinkSqlParser.js";
154
157
  import { ConstantDefaultContext } from "./FlinkSqlParser.js";
155
158
  import { ParenthesizedExpressionContext } from "./FlinkSqlParser.js";
159
+ import { ExtractContext } from "./FlinkSqlParser.js";
156
160
  import { FunctionCallContext } from "./FlinkSqlParser.js";
157
161
  import { SearchedCaseContext } from "./FlinkSqlParser.js";
158
162
  import { PositionContext } from "./FlinkSqlParser.js";
@@ -162,6 +166,10 @@ import { FunctionNameContext } from "./FlinkSqlParser.js";
162
166
  import { FunctionNameAndParamsContext } from "./FlinkSqlParser.js";
163
167
  import { FunctionNameWithParamsContext } from "./FlinkSqlParser.js";
164
168
  import { FunctionParamContext } from "./FlinkSqlParser.js";
169
+ import { JsonValueParamsContext } from "./FlinkSqlParser.js";
170
+ import { JsonQueryParamsContext } from "./FlinkSqlParser.js";
171
+ import { JsonObjectParamsContext } from "./FlinkSqlParser.js";
172
+ import { JsonArrayParamsContext } from "./FlinkSqlParser.js";
165
173
  import { DereferenceDefinitionContext } from "./FlinkSqlParser.js";
166
174
  import { CorrelationNameContext } from "./FlinkSqlParser.js";
167
175
  import { QualifiedNameContext } from "./FlinkSqlParser.js";
@@ -1007,6 +1015,18 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1007
1015
  * @return the visitor result
1008
1016
  */
1009
1017
  visitFrameBound?: (ctx: FrameBoundContext) => Result;
1018
+ /**
1019
+ * Visit a parse tree produced by `FlinkSqlParser.frameStart`.
1020
+ * @param ctx the parse tree
1021
+ * @return the visitor result
1022
+ */
1023
+ visitFrameStart?: (ctx: FrameStartContext) => Result;
1024
+ /**
1025
+ * Visit a parse tree produced by `FlinkSqlParser.frameEnd`.
1026
+ * @param ctx the parse tree
1027
+ * @return the visitor result
1028
+ */
1029
+ visitFrameEnd?: (ctx: FrameEndContext) => Result;
1010
1030
  /**
1011
1031
  * Visit a parse tree produced by `FlinkSqlParser.withinClause`.
1012
1032
  * @param ctx the parse tree
@@ -1060,6 +1080,12 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1060
1080
  * @return the visitor result
1061
1081
  */
1062
1082
  visitPredicate?: (ctx: PredicateContext) => Result;
1083
+ /**
1084
+ * Visit a parse tree produced by `FlinkSqlParser.jsonFunctionBranch`.
1085
+ * @param ctx the parse tree
1086
+ * @return the visitor result
1087
+ */
1088
+ visitJsonFunctionBranch?: (ctx: JsonFunctionBranchContext) => Result;
1063
1089
  /**
1064
1090
  * Visit a parse tree produced by `FlinkSqlParser.likePredicate`.
1065
1091
  * @param ctx the parse tree
@@ -1170,6 +1196,13 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1170
1196
  * @return the visitor result
1171
1197
  */
1172
1198
  visitParenthesizedExpression?: (ctx: ParenthesizedExpressionContext) => Result;
1199
+ /**
1200
+ * Visit a parse tree produced by the `extract`
1201
+ * labeled alternative in `FlinkSqlParser.primaryExpression`.
1202
+ * @param ctx the parse tree
1203
+ * @return the visitor result
1204
+ */
1205
+ visitExtract?: (ctx: ExtractContext) => Result;
1173
1206
  /**
1174
1207
  * Visit a parse tree produced by the `functionCall`
1175
1208
  * labeled alternative in `FlinkSqlParser.primaryExpression`.
@@ -1228,6 +1261,30 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
1228
1261
  * @return the visitor result
1229
1262
  */
1230
1263
  visitFunctionParam?: (ctx: FunctionParamContext) => Result;
1264
+ /**
1265
+ * Visit a parse tree produced by `FlinkSqlParser.jsonValueParams`.
1266
+ * @param ctx the parse tree
1267
+ * @return the visitor result
1268
+ */
1269
+ visitJsonValueParams?: (ctx: JsonValueParamsContext) => Result;
1270
+ /**
1271
+ * Visit a parse tree produced by `FlinkSqlParser.jsonQueryParams`.
1272
+ * @param ctx the parse tree
1273
+ * @return the visitor result
1274
+ */
1275
+ visitJsonQueryParams?: (ctx: JsonQueryParamsContext) => Result;
1276
+ /**
1277
+ * Visit a parse tree produced by `FlinkSqlParser.jsonObjectParams`.
1278
+ * @param ctx the parse tree
1279
+ * @return the visitor result
1280
+ */
1281
+ visitJsonObjectParams?: (ctx: JsonObjectParamsContext) => Result;
1282
+ /**
1283
+ * Visit a parse tree produced by `FlinkSqlParser.jsonArrayParams`.
1284
+ * @param ctx the parse tree
1285
+ * @return the visitor result
1286
+ */
1287
+ visitJsonArrayParams?: (ctx: JsonArrayParamsContext) => Result;
1231
1288
  /**
1232
1289
  * Visit a parse tree produced by `FlinkSqlParser.dereferenceDefinition`.
1233
1290
  * @param ctx the parse tree
@@ -108,7 +108,8 @@ export class TrinoSQL extends BasicSQL {
108
108
  break;
109
109
  }
110
110
  case TrinoSqlParser.RULE_columnName: {
111
- if (candidateRule.ruleList.includes(TrinoSqlParser.RULE_groupBy) ||
111
+ if (candidateRule.ruleList.includes(TrinoSqlParser.RULE_selectItem) ||
112
+ candidateRule.ruleList.includes(TrinoSqlParser.RULE_groupBy) ||
112
113
  candidateRule.ruleList.includes(TrinoSqlParser.RULE_sortItem) ||
113
114
  candidateRule.ruleList.includes(TrinoSqlParser.RULE_whereClause) ||
114
115
  candidateRule.ruleList.includes(TrinoSqlParser.RULE_havingClause) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-sql-parser",
3
- "version": "4.4.0-beta.0",
3
+ "version": "4.4.2-beta.0",
4
4
  "authors": "DTStack Corporation",
5
5
  "description": "SQL Parsers for BigData, built with antlr4",
6
6
  "keywords": [