dt-sql-parser 4.0.1 → 4.1.0-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.
- package/README.md +6 -1
- package/dist/lib/flink/FlinkSqlLexer.js +1 -2
- package/dist/lib/flink/FlinkSqlParser.d.ts +175 -174
- package/dist/lib/flink/FlinkSqlParser.js +2315 -2388
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +5 -16
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +3 -10
- package/dist/lib/hive/HiveSqlLexer.js +1 -2
- package/dist/lib/hive/HiveSqlParser.d.ts +3 -1
- package/dist/lib/hive/HiveSqlParser.js +8 -9
- package/dist/lib/impala/ImpalaSqlLexer.js +1 -2
- package/dist/lib/impala/ImpalaSqlParser.d.ts +123 -107
- package/dist/lib/impala/ImpalaSqlParser.js +3223 -3155
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -0
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -0
- package/dist/lib/mysql/MySqlLexer.js +1 -2
- package/dist/lib/mysql/MySqlParser.d.ts +469 -422
- package/dist/lib/mysql/MySqlParser.js +11463 -10512
- package/dist/lib/mysql/MySqlParserListener.d.ts +42 -20
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +26 -12
- package/dist/lib/postgresql/PostgreSqlLexer.js +1 -2
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +2025 -6265
- package/dist/lib/postgresql/PostgreSqlParser.js +60092 -88368
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +1688 -6083
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +712 -3511
- package/dist/lib/spark/SparkSqlLexer.js +1 -2
- package/dist/lib/spark/SparkSqlParser.d.ts +16 -13
- package/dist/lib/spark/SparkSqlParser.js +50 -51
- package/dist/lib/spark/SparkSqlParserListener.d.ts +10 -10
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +6 -6
- package/dist/lib/trino/TrinoSqlLexer.d.ts +323 -260
- package/dist/lib/trino/TrinoSqlLexer.js +1610 -1264
- package/dist/lib/trino/TrinoSqlListener.d.ts +1311 -200
- package/dist/lib/trino/TrinoSqlParser.d.ts +1908 -562
- package/dist/lib/trino/TrinoSqlParser.js +22629 -13412
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +761 -69
- package/dist/locale/locale.d.ts +41 -0
- package/dist/locale/locale.js +43 -0
- package/dist/parser/common/basicSQL.d.ts +7 -2
- package/dist/parser/common/basicSQL.js +5 -15
- package/dist/parser/common/entityCollector.d.ts +60 -12
- package/dist/parser/common/entityCollector.js +141 -17
- package/dist/parser/common/parseErrorListener.d.ts +6 -3
- package/dist/parser/common/parseErrorListener.js +83 -2
- package/dist/parser/common/textAndWord.d.ts +6 -9
- package/dist/parser/common/textAndWord.js +9 -20
- package/dist/parser/common/transform.d.ts +8 -0
- package/dist/parser/common/transform.js +11 -0
- package/dist/parser/common/types.d.ts +1 -0
- package/dist/parser/flink/flinkEntityCollector.js +40 -6
- package/dist/parser/flink/flinkErrorListener.d.ts +9 -0
- package/dist/parser/flink/flinkErrorListener.js +67 -0
- package/dist/parser/flink/index.d.ts +3 -0
- package/dist/parser/flink/index.js +13 -9
- package/dist/parser/hive/hiveEntityCollector.js +40 -6
- package/dist/parser/hive/hiveErrorListener.d.ts +9 -0
- package/dist/parser/hive/hiveErrorListener.js +65 -0
- package/dist/parser/hive/index.d.ts +3 -0
- package/dist/parser/hive/index.js +13 -9
- package/dist/parser/impala/ImpalaErrorListener.d.ts +9 -0
- package/dist/parser/impala/ImpalaErrorListener.js +63 -0
- package/dist/parser/impala/impalaEntityCollector.js +51 -6
- package/dist/parser/impala/index.d.ts +3 -0
- package/dist/parser/impala/index.js +4 -0
- package/dist/parser/mysql/index.d.ts +3 -0
- package/dist/parser/mysql/index.js +4 -0
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +3 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +40 -5
- package/dist/parser/mysql/mysqlErrorListener.d.ts +9 -0
- package/dist/parser/mysql/mysqlErrorListener.js +63 -0
- package/dist/parser/postgresql/index.d.ts +3 -0
- package/dist/parser/postgresql/index.js +17 -13
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +5 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +44 -4
- package/dist/parser/postgresql/postgreErrorListener.d.ts +9 -0
- package/dist/parser/postgresql/postgreErrorListener.js +71 -0
- package/dist/parser/spark/index.d.ts +3 -0
- package/dist/parser/spark/index.js +4 -0
- package/dist/parser/spark/sparkEntityCollector.d.ts +1 -1
- package/dist/parser/spark/sparkEntityCollector.js +43 -6
- package/dist/parser/spark/sparkErrorListener.d.ts +9 -0
- package/dist/parser/spark/sparkErrorListener.js +63 -0
- package/dist/parser/trino/index.d.ts +3 -0
- package/dist/parser/trino/index.js +23 -10
- package/dist/parser/trino/trinoEntityCollector.d.ts +6 -4
- package/dist/parser/trino/trinoEntityCollector.js +44 -9
- package/dist/parser/trino/trinoErrorListener.d.ts +9 -0
- package/dist/parser/trino/trinoErrorListener.js +65 -0
- package/package.json +40 -12
|
@@ -35,7 +35,6 @@ import { LengthOneTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
|
35
35
|
import { MapTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
36
36
|
import { RowTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
37
37
|
import { ColumnConstraintContext } from "./FlinkSqlParser.js";
|
|
38
|
-
import { CommentSpecContext } from "./FlinkSqlParser.js";
|
|
39
38
|
import { MetadataColumnDefinitionContext } from "./FlinkSqlParser.js";
|
|
40
39
|
import { MetadataKeyContext } from "./FlinkSqlParser.js";
|
|
41
40
|
import { ComputedColumnDefinitionContext } from "./FlinkSqlParser.js";
|
|
@@ -64,7 +63,7 @@ import { AddConstraintContext } from "./FlinkSqlParser.js";
|
|
|
64
63
|
import { DropConstraintContext } from "./FlinkSqlParser.js";
|
|
65
64
|
import { AddUniqueContext } from "./FlinkSqlParser.js";
|
|
66
65
|
import { NotForcedContext } from "./FlinkSqlParser.js";
|
|
67
|
-
import {
|
|
66
|
+
import { AlterViewContext } from "./FlinkSqlParser.js";
|
|
68
67
|
import { AlterDatabaseContext } from "./FlinkSqlParser.js";
|
|
69
68
|
import { AlterFunctionContext } from "./FlinkSqlParser.js";
|
|
70
69
|
import { DropCatalogContext } from "./FlinkSqlParser.js";
|
|
@@ -577,16 +576,6 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
|
|
|
577
576
|
* @param ctx the parse tree
|
|
578
577
|
*/
|
|
579
578
|
exitColumnConstraint?: (ctx: ColumnConstraintContext) => void;
|
|
580
|
-
/**
|
|
581
|
-
* Enter a parse tree produced by `FlinkSqlParser.commentSpec`.
|
|
582
|
-
* @param ctx the parse tree
|
|
583
|
-
*/
|
|
584
|
-
enterCommentSpec?: (ctx: CommentSpecContext) => void;
|
|
585
|
-
/**
|
|
586
|
-
* Exit a parse tree produced by `FlinkSqlParser.commentSpec`.
|
|
587
|
-
* @param ctx the parse tree
|
|
588
|
-
*/
|
|
589
|
-
exitCommentSpec?: (ctx: CommentSpecContext) => void;
|
|
590
579
|
/**
|
|
591
580
|
* Enter a parse tree produced by `FlinkSqlParser.metadataColumnDefinition`.
|
|
592
581
|
* @param ctx the parse tree
|
|
@@ -872,15 +861,15 @@ export declare class FlinkSqlParserListener implements ParseTreeListener {
|
|
|
872
861
|
*/
|
|
873
862
|
exitNotForced?: (ctx: NotForcedContext) => void;
|
|
874
863
|
/**
|
|
875
|
-
* Enter a parse tree produced by `FlinkSqlParser.
|
|
864
|
+
* Enter a parse tree produced by `FlinkSqlParser.alterView`.
|
|
876
865
|
* @param ctx the parse tree
|
|
877
866
|
*/
|
|
878
|
-
|
|
867
|
+
enterAlterView?: (ctx: AlterViewContext) => void;
|
|
879
868
|
/**
|
|
880
|
-
* Exit a parse tree produced by `FlinkSqlParser.
|
|
869
|
+
* Exit a parse tree produced by `FlinkSqlParser.alterView`.
|
|
881
870
|
* @param ctx the parse tree
|
|
882
871
|
*/
|
|
883
|
-
|
|
872
|
+
exitAlterView?: (ctx: AlterViewContext) => void;
|
|
884
873
|
/**
|
|
885
874
|
* Enter a parse tree produced by `FlinkSqlParser.alterDatabase`.
|
|
886
875
|
* @param ctx the parse tree
|
|
@@ -35,7 +35,6 @@ import { LengthOneTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
|
35
35
|
import { MapTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
36
36
|
import { RowTypeDimensionContext } from "./FlinkSqlParser.js";
|
|
37
37
|
import { ColumnConstraintContext } from "./FlinkSqlParser.js";
|
|
38
|
-
import { CommentSpecContext } from "./FlinkSqlParser.js";
|
|
39
38
|
import { MetadataColumnDefinitionContext } from "./FlinkSqlParser.js";
|
|
40
39
|
import { MetadataKeyContext } from "./FlinkSqlParser.js";
|
|
41
40
|
import { ComputedColumnDefinitionContext } from "./FlinkSqlParser.js";
|
|
@@ -64,7 +63,7 @@ import { AddConstraintContext } from "./FlinkSqlParser.js";
|
|
|
64
63
|
import { DropConstraintContext } from "./FlinkSqlParser.js";
|
|
65
64
|
import { AddUniqueContext } from "./FlinkSqlParser.js";
|
|
66
65
|
import { NotForcedContext } from "./FlinkSqlParser.js";
|
|
67
|
-
import {
|
|
66
|
+
import { AlterViewContext } from "./FlinkSqlParser.js";
|
|
68
67
|
import { AlterDatabaseContext } from "./FlinkSqlParser.js";
|
|
69
68
|
import { AlterFunctionContext } from "./FlinkSqlParser.js";
|
|
70
69
|
import { DropCatalogContext } from "./FlinkSqlParser.js";
|
|
@@ -436,12 +435,6 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
|
|
|
436
435
|
* @return the visitor result
|
|
437
436
|
*/
|
|
438
437
|
visitColumnConstraint?: (ctx: ColumnConstraintContext) => Result;
|
|
439
|
-
/**
|
|
440
|
-
* Visit a parse tree produced by `FlinkSqlParser.commentSpec`.
|
|
441
|
-
* @param ctx the parse tree
|
|
442
|
-
* @return the visitor result
|
|
443
|
-
*/
|
|
444
|
-
visitCommentSpec?: (ctx: CommentSpecContext) => Result;
|
|
445
438
|
/**
|
|
446
439
|
* Visit a parse tree produced by `FlinkSqlParser.metadataColumnDefinition`.
|
|
447
440
|
* @param ctx the parse tree
|
|
@@ -613,11 +606,11 @@ export declare class FlinkSqlParserVisitor<Result> extends AbstractParseTreeVisi
|
|
|
613
606
|
*/
|
|
614
607
|
visitNotForced?: (ctx: NotForcedContext) => Result;
|
|
615
608
|
/**
|
|
616
|
-
* Visit a parse tree produced by `FlinkSqlParser.
|
|
609
|
+
* Visit a parse tree produced by `FlinkSqlParser.alterView`.
|
|
617
610
|
* @param ctx the parse tree
|
|
618
611
|
* @return the visitor result
|
|
619
612
|
*/
|
|
620
|
-
|
|
613
|
+
visitAlterView?: (ctx: AlterViewContext) => Result;
|
|
621
614
|
/**
|
|
622
615
|
* Visit a parse tree produced by `FlinkSqlParser.alterDatabase`.
|
|
623
616
|
* @param ctx the parse tree
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated from dt-sql-parser/src/grammar/hive/HiveSqlLexer.g4 by ANTLR 4.13.1
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import * as antlr from "antlr4ng";
|
|
4
|
-
class HiveSqlLexer extends antlr.Lexer {
|
|
4
|
+
export class HiveSqlLexer extends antlr.Lexer {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super(input);
|
|
7
7
|
this.interpreter = new antlr.LexerATNSimulator(this, HiveSqlLexer._ATN, HiveSqlLexer.decisionsToDFA, new antlr.PredictionContextCache());
|
|
@@ -2286,4 +2286,3 @@ HiveSqlLexer._serializedATN = [
|
|
|
2286
2286
|
];
|
|
2287
2287
|
HiveSqlLexer.vocabulary = new antlr.Vocabulary(HiveSqlLexer.literalNames, HiveSqlLexer.symbolicNames, []);
|
|
2288
2288
|
HiveSqlLexer.decisionsToDFA = HiveSqlLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
|
|
2289
|
-
export { HiveSqlLexer };
|
|
@@ -3289,10 +3289,11 @@ export declare class TableConstraintContext extends antlr.ParserRuleContext {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
export declare class ColumnNameTypeConstraintContext extends antlr.ParserRuleContext {
|
|
3291
3291
|
_colName?: ColumnNameCreateContext;
|
|
3292
|
+
_colType?: ColumnTypeContext;
|
|
3292
3293
|
_comment?: Token | null;
|
|
3293
3294
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
3294
|
-
columnType(): ColumnTypeContext;
|
|
3295
3295
|
columnNameCreate(): ColumnNameCreateContext;
|
|
3296
|
+
columnType(): ColumnTypeContext;
|
|
3296
3297
|
columnConstraint(): ColumnConstraintContext | null;
|
|
3297
3298
|
KW_COMMENT(): antlr.TerminalNode | null;
|
|
3298
3299
|
StringLiteral(): antlr.TerminalNode | null;
|
|
@@ -4495,6 +4496,7 @@ export declare class JoinTokenContext extends antlr.ParserRuleContext {
|
|
|
4495
4496
|
accept<Result>(visitor: HiveSqlParserVisitor<Result>): Result | null;
|
|
4496
4497
|
}
|
|
4497
4498
|
export declare class LateralViewContext extends antlr.ParserRuleContext {
|
|
4499
|
+
_alias?: TableAliasContext;
|
|
4498
4500
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
4499
4501
|
KW_LATERAL(): antlr.TerminalNode;
|
|
4500
4502
|
KW_VIEW(): antlr.TerminalNode | null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import * as antlr from "antlr4ng";
|
|
4
4
|
import { SQLParserBase } from '../SQLParserBase';
|
|
5
|
-
class HiveSqlParser extends SQLParserBase {
|
|
5
|
+
export class HiveSqlParser extends SQLParserBase {
|
|
6
6
|
get grammarFileName() { return "HiveSqlParser.g4"; }
|
|
7
7
|
get literalNames() { return HiveSqlParser.literalNames; }
|
|
8
8
|
get symbolicNames() { return HiveSqlParser.symbolicNames; }
|
|
@@ -9805,7 +9805,7 @@ class HiveSqlParser extends SQLParserBase {
|
|
|
9805
9805
|
this.state = 2290;
|
|
9806
9806
|
localContext._colName = this.columnNameCreate();
|
|
9807
9807
|
this.state = 2291;
|
|
9808
|
-
this.columnType();
|
|
9808
|
+
localContext._colType = this.columnType();
|
|
9809
9809
|
this.state = 2293;
|
|
9810
9810
|
this.errorHandler.sync(this);
|
|
9811
9811
|
_la = this.tokenStream.LA(1);
|
|
@@ -15726,7 +15726,7 @@ class HiveSqlParser extends SQLParserBase {
|
|
|
15726
15726
|
this.state = 3480;
|
|
15727
15727
|
this.function_();
|
|
15728
15728
|
this.state = 3481;
|
|
15729
|
-
this.tableAlias();
|
|
15729
|
+
localContext._alias = this.tableAlias();
|
|
15730
15730
|
this.state = 3491;
|
|
15731
15731
|
this.errorHandler.sync(this);
|
|
15732
15732
|
_la = this.tokenStream.LA(1);
|
|
@@ -15782,7 +15782,7 @@ class HiveSqlParser extends SQLParserBase {
|
|
|
15782
15782
|
this.state = 3498;
|
|
15783
15783
|
this.function_();
|
|
15784
15784
|
this.state = 3499;
|
|
15785
|
-
this.tableAlias();
|
|
15785
|
+
localContext._alias = this.tableAlias();
|
|
15786
15786
|
this.state = 3509;
|
|
15787
15787
|
this.errorHandler.sync(this);
|
|
15788
15788
|
_la = this.tokenStream.LA(1);
|
|
@@ -15834,7 +15834,7 @@ class HiveSqlParser extends SQLParserBase {
|
|
|
15834
15834
|
}
|
|
15835
15835
|
}
|
|
15836
15836
|
this.state = 3518;
|
|
15837
|
-
this.tableAlias();
|
|
15837
|
+
localContext._alias = this.tableAlias();
|
|
15838
15838
|
this.state = 3530;
|
|
15839
15839
|
this.errorHandler.sync(this);
|
|
15840
15840
|
switch (this.interpreter.adaptivePredict(this.tokenStream, 458, this.context)) {
|
|
@@ -27449,7 +27449,6 @@ HiveSqlParser._serializedATN = [
|
|
|
27449
27449
|
];
|
|
27450
27450
|
HiveSqlParser.vocabulary = new antlr.Vocabulary(HiveSqlParser.literalNames, HiveSqlParser.symbolicNames, []);
|
|
27451
27451
|
HiveSqlParser.decisionsToDFA = HiveSqlParser._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
|
|
27452
|
-
export { HiveSqlParser };
|
|
27453
27452
|
export class ProgramContext extends antlr.ParserRuleContext {
|
|
27454
27453
|
constructor(parent, invokingState) {
|
|
27455
27454
|
super(parent, invokingState);
|
|
@@ -34364,12 +34363,12 @@ export class ColumnNameTypeConstraintContext extends antlr.ParserRuleContext {
|
|
|
34364
34363
|
constructor(parent, invokingState) {
|
|
34365
34364
|
super(parent, invokingState);
|
|
34366
34365
|
}
|
|
34367
|
-
columnType() {
|
|
34368
|
-
return this.getRuleContext(0, ColumnTypeContext);
|
|
34369
|
-
}
|
|
34370
34366
|
columnNameCreate() {
|
|
34371
34367
|
return this.getRuleContext(0, ColumnNameCreateContext);
|
|
34372
34368
|
}
|
|
34369
|
+
columnType() {
|
|
34370
|
+
return this.getRuleContext(0, ColumnTypeContext);
|
|
34371
|
+
}
|
|
34373
34372
|
columnConstraint() {
|
|
34374
34373
|
return this.getRuleContext(0, ColumnConstraintContext);
|
|
34375
34374
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated from dt-sql-parser/src/grammar/impala/ImpalaSqlLexer.g4 by ANTLR 4.13.1
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import * as antlr from "antlr4ng";
|
|
4
|
-
class ImpalaSqlLexer extends antlr.Lexer {
|
|
4
|
+
export class ImpalaSqlLexer extends antlr.Lexer {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super(input);
|
|
7
7
|
this.interpreter = new antlr.LexerATNSimulator(this, ImpalaSqlLexer._ATN, ImpalaSqlLexer.decisionsToDFA, new antlr.PredictionContextCache());
|
|
@@ -1506,4 +1506,3 @@ ImpalaSqlLexer._serializedATN = [
|
|
|
1506
1506
|
];
|
|
1507
1507
|
ImpalaSqlLexer.vocabulary = new antlr.Vocabulary(ImpalaSqlLexer.literalNames, ImpalaSqlLexer.symbolicNames, []);
|
|
1508
1508
|
ImpalaSqlLexer.decisionsToDFA = ImpalaSqlLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
|
|
1509
|
-
export { ImpalaSqlLexer };
|
|
@@ -395,87 +395,89 @@ export declare class ImpalaSqlParser extends SQLParserBase {
|
|
|
395
395
|
static readonly RULE_assignmentList = 99;
|
|
396
396
|
static readonly RULE_assignmentItem = 100;
|
|
397
397
|
static readonly RULE_viewColumns = 101;
|
|
398
|
-
static readonly
|
|
399
|
-
static readonly
|
|
400
|
-
static readonly
|
|
401
|
-
static readonly
|
|
402
|
-
static readonly
|
|
403
|
-
static readonly
|
|
404
|
-
static readonly
|
|
405
|
-
static readonly
|
|
406
|
-
static readonly
|
|
407
|
-
static readonly
|
|
408
|
-
static readonly
|
|
409
|
-
static readonly
|
|
410
|
-
static readonly
|
|
411
|
-
static readonly
|
|
412
|
-
static readonly
|
|
413
|
-
static readonly
|
|
414
|
-
static readonly
|
|
415
|
-
static readonly
|
|
416
|
-
static readonly
|
|
417
|
-
static readonly
|
|
418
|
-
static readonly
|
|
419
|
-
static readonly
|
|
420
|
-
static readonly
|
|
421
|
-
static readonly
|
|
422
|
-
static readonly
|
|
423
|
-
static readonly
|
|
424
|
-
static readonly
|
|
425
|
-
static readonly
|
|
426
|
-
static readonly
|
|
427
|
-
static readonly
|
|
428
|
-
static readonly
|
|
429
|
-
static readonly
|
|
430
|
-
static readonly
|
|
431
|
-
static readonly
|
|
432
|
-
static readonly
|
|
433
|
-
static readonly
|
|
434
|
-
static readonly
|
|
435
|
-
static readonly
|
|
436
|
-
static readonly
|
|
437
|
-
static readonly
|
|
438
|
-
static readonly
|
|
439
|
-
static readonly
|
|
440
|
-
static readonly
|
|
441
|
-
static readonly
|
|
442
|
-
static readonly
|
|
443
|
-
static readonly
|
|
444
|
-
static readonly
|
|
445
|
-
static readonly
|
|
446
|
-
static readonly
|
|
447
|
-
static readonly
|
|
448
|
-
static readonly
|
|
449
|
-
static readonly
|
|
450
|
-
static readonly
|
|
451
|
-
static readonly
|
|
452
|
-
static readonly
|
|
453
|
-
static readonly
|
|
454
|
-
static readonly
|
|
455
|
-
static readonly
|
|
456
|
-
static readonly
|
|
457
|
-
static readonly
|
|
458
|
-
static readonly
|
|
459
|
-
static readonly
|
|
460
|
-
static readonly
|
|
461
|
-
static readonly
|
|
462
|
-
static readonly
|
|
463
|
-
static readonly
|
|
464
|
-
static readonly
|
|
465
|
-
static readonly
|
|
466
|
-
static readonly
|
|
467
|
-
static readonly
|
|
468
|
-
static readonly
|
|
469
|
-
static readonly
|
|
470
|
-
static readonly
|
|
471
|
-
static readonly
|
|
472
|
-
static readonly
|
|
473
|
-
static readonly
|
|
474
|
-
static readonly
|
|
475
|
-
static readonly
|
|
476
|
-
static readonly
|
|
477
|
-
static readonly
|
|
478
|
-
static readonly
|
|
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;
|
|
479
481
|
static readonly literalNames: (string | null)[];
|
|
480
482
|
static readonly symbolicNames: (string | null)[];
|
|
481
483
|
static readonly ruleNames: string[];
|
|
@@ -588,6 +590,7 @@ export declare class ImpalaSqlParser extends SQLParserBase {
|
|
|
588
590
|
assignmentList(): AssignmentListContext;
|
|
589
591
|
assignmentItem(): AssignmentItemContext;
|
|
590
592
|
viewColumns(): ViewColumnsContext;
|
|
593
|
+
viewColumnItem(): ViewColumnItemContext;
|
|
591
594
|
queryStatement(): QueryStatementContext;
|
|
592
595
|
with_(): WithContext;
|
|
593
596
|
constraintSpecification(): ConstraintSpecificationContext;
|
|
@@ -596,6 +599,7 @@ export declare class ImpalaSqlParser extends SQLParserBase {
|
|
|
596
599
|
columnDefinition(): ColumnDefinitionContext;
|
|
597
600
|
kuduTableElement(): KuduTableElementContext;
|
|
598
601
|
kuduColumnDefinition(): KuduColumnDefinitionContext;
|
|
602
|
+
commentClause(): CommentClauseContext;
|
|
599
603
|
columnSpecWithKudu(): ColumnSpecWithKuduContext;
|
|
600
604
|
createColumnSpecWithKudu(): CreateColumnSpecWithKuduContext;
|
|
601
605
|
kuduAttributes(): KuduAttributesContext;
|
|
@@ -832,8 +836,7 @@ export declare class CreateKuduTableAsSelectContext extends antlr.ParserRuleCont
|
|
|
832
836
|
KW_PARTITION(): antlr.TerminalNode | null;
|
|
833
837
|
KW_BY(): antlr.TerminalNode | null;
|
|
834
838
|
kuduPartitionClause(): KuduPartitionClauseContext | null;
|
|
835
|
-
|
|
836
|
-
stringLiteral(): StringLiteralContext | null;
|
|
839
|
+
commentClause(): CommentClauseContext | null;
|
|
837
840
|
KW_TBLPROPERTIES(): antlr.TerminalNode | null;
|
|
838
841
|
queryStatement(): QueryStatementContext | null;
|
|
839
842
|
properties(): PropertiesContext | null;
|
|
@@ -856,8 +859,7 @@ export declare class CreateViewContext extends antlr.ParserRuleContext {
|
|
|
856
859
|
queryStatement(): QueryStatementContext;
|
|
857
860
|
ifNotExists(): IfNotExistsContext | null;
|
|
858
861
|
viewColumns(): ViewColumnsContext | null;
|
|
859
|
-
|
|
860
|
-
stringLiteral(): StringLiteralContext | null;
|
|
862
|
+
commentClause(): CommentClauseContext | null;
|
|
861
863
|
KW_TBLPROPERTIES(): antlr.TerminalNode | null;
|
|
862
864
|
properties(): PropertiesContext | null;
|
|
863
865
|
get ruleIndex(): number;
|
|
@@ -866,7 +868,6 @@ export declare class CreateViewContext extends antlr.ParserRuleContext {
|
|
|
866
868
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
867
869
|
}
|
|
868
870
|
export declare class CreateSchemaContext extends antlr.ParserRuleContext {
|
|
869
|
-
_comment?: StringLiteralContext;
|
|
870
871
|
_location?: StringLiteralContext;
|
|
871
872
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
872
873
|
KW_CREATE(): antlr.TerminalNode;
|
|
@@ -874,10 +875,9 @@ export declare class CreateSchemaContext extends antlr.ParserRuleContext {
|
|
|
874
875
|
KW_SCHEMA(): antlr.TerminalNode | null;
|
|
875
876
|
KW_DATABASE(): antlr.TerminalNode | null;
|
|
876
877
|
ifNotExists(): IfNotExistsContext | null;
|
|
877
|
-
|
|
878
|
+
commentClause(): CommentClauseContext | null;
|
|
878
879
|
KW_LOCATION(): antlr.TerminalNode | null;
|
|
879
|
-
stringLiteral(): StringLiteralContext
|
|
880
|
-
stringLiteral(i: number): StringLiteralContext | null;
|
|
880
|
+
stringLiteral(): StringLiteralContext | null;
|
|
881
881
|
get ruleIndex(): number;
|
|
882
882
|
enterRule(listener: ImpalaSqlParserListener): void;
|
|
883
883
|
exitRule(listener: ImpalaSqlParserListener): void;
|
|
@@ -895,13 +895,12 @@ export declare class CreateRoleContext extends antlr.ParserRuleContext {
|
|
|
895
895
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
896
896
|
}
|
|
897
897
|
export declare class CreateAggregateFunctionContext extends antlr.ParserRuleContext {
|
|
898
|
+
_returnType?: TypeContext;
|
|
898
899
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
899
900
|
KW_CREATE(): antlr.TerminalNode;
|
|
900
901
|
KW_FUNCTION(): antlr.TerminalNode;
|
|
901
902
|
functionNameCreate(): FunctionNameCreateContext;
|
|
902
903
|
KW_RETURNS(): antlr.TerminalNode;
|
|
903
|
-
type_(): TypeContext[];
|
|
904
|
-
type_(i: number): TypeContext | null;
|
|
905
904
|
KW_LOCATION(): antlr.TerminalNode;
|
|
906
905
|
STRING(): antlr.TerminalNode[];
|
|
907
906
|
STRING(i: number): antlr.TerminalNode | null;
|
|
@@ -909,6 +908,8 @@ export declare class CreateAggregateFunctionContext extends antlr.ParserRuleCont
|
|
|
909
908
|
EQ(): antlr.TerminalNode[];
|
|
910
909
|
EQ(i: number): antlr.TerminalNode | null;
|
|
911
910
|
KW_MERGE_FN(): antlr.TerminalNode;
|
|
911
|
+
type_(): TypeContext[];
|
|
912
|
+
type_(i: number): TypeContext | null;
|
|
912
913
|
KW_AGGREGATE(): antlr.TerminalNode | null;
|
|
913
914
|
ifNotExists(): IfNotExistsContext | null;
|
|
914
915
|
LPAREN(): antlr.TerminalNode | null;
|
|
@@ -927,6 +928,7 @@ export declare class CreateAggregateFunctionContext extends antlr.ParserRuleCont
|
|
|
927
928
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
928
929
|
}
|
|
929
930
|
export declare class CreateFunctionContext extends antlr.ParserRuleContext {
|
|
931
|
+
_returnType?: TypeContext;
|
|
930
932
|
_symbol_?: StringLiteralContext;
|
|
931
933
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
932
934
|
KW_CREATE(): antlr.TerminalNode;
|
|
@@ -1040,7 +1042,7 @@ export declare class ChangeColumnDefineContext extends antlr.ParserRuleContext {
|
|
|
1040
1042
|
KW_TABLE(): antlr.TerminalNode;
|
|
1041
1043
|
tableNamePath(): TableNamePathContext;
|
|
1042
1044
|
KW_CHANGE(): antlr.TerminalNode;
|
|
1043
|
-
|
|
1045
|
+
columnNamePath(): ColumnNamePathContext;
|
|
1044
1046
|
columnSpecWithKudu(): ColumnSpecWithKuduContext;
|
|
1045
1047
|
get ruleIndex(): number;
|
|
1046
1048
|
enterRule(listener: ImpalaSqlParserListener): void;
|
|
@@ -2111,7 +2113,6 @@ export declare class TableOrViewPathContext extends antlr.ParserRuleContext {
|
|
|
2111
2113
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2112
2114
|
}
|
|
2113
2115
|
export declare class CreateCommonItemContext extends antlr.ParserRuleContext {
|
|
2114
|
-
_comment?: StringLiteralContext;
|
|
2115
2116
|
_serdProp?: PropertiesContext;
|
|
2116
2117
|
_location?: StringLiteralContext;
|
|
2117
2118
|
_cacheName?: QualifiedNameContext;
|
|
@@ -2120,7 +2121,7 @@ export declare class CreateCommonItemContext extends antlr.ParserRuleContext {
|
|
|
2120
2121
|
KW_SORT(): antlr.TerminalNode | null;
|
|
2121
2122
|
KW_BY(): antlr.TerminalNode | null;
|
|
2122
2123
|
columnAliases(): ColumnAliasesContext | null;
|
|
2123
|
-
|
|
2124
|
+
commentClause(): CommentClauseContext | null;
|
|
2124
2125
|
KW_ROW(): antlr.TerminalNode | null;
|
|
2125
2126
|
KW_FORMAT(): antlr.TerminalNode | null;
|
|
2126
2127
|
rowFormat(): RowFormatContext | null;
|
|
@@ -2135,10 +2136,9 @@ export declare class CreateCommonItemContext extends antlr.ParserRuleContext {
|
|
|
2135
2136
|
KW_IN(): antlr.TerminalNode | null;
|
|
2136
2137
|
KW_UNCACHED(): antlr.TerminalNode | null;
|
|
2137
2138
|
KW_TBLPROPERTIES(): antlr.TerminalNode | null;
|
|
2138
|
-
stringLiteral(): StringLiteralContext[];
|
|
2139
|
-
stringLiteral(i: number): StringLiteralContext | null;
|
|
2140
2139
|
properties(): PropertiesContext[];
|
|
2141
2140
|
properties(i: number): PropertiesContext | null;
|
|
2141
|
+
stringLiteral(): StringLiteralContext | null;
|
|
2142
2142
|
qualifiedName(): QualifiedNameContext | null;
|
|
2143
2143
|
KW_REPLICATION(): antlr.TerminalNode | null;
|
|
2144
2144
|
EQ(): antlr.TerminalNode | null;
|
|
@@ -2172,13 +2172,9 @@ export declare class AssignmentItemContext extends antlr.ParserRuleContext {
|
|
|
2172
2172
|
export declare class ViewColumnsContext extends antlr.ParserRuleContext {
|
|
2173
2173
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2174
2174
|
LPAREN(): antlr.TerminalNode;
|
|
2175
|
-
columnNamePathCreate(): ColumnNamePathCreateContext[];
|
|
2176
|
-
columnNamePathCreate(i: number): ColumnNamePathCreateContext | null;
|
|
2177
2175
|
RPAREN(): antlr.TerminalNode;
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
stringLiteral(): StringLiteralContext[];
|
|
2181
|
-
stringLiteral(i: number): StringLiteralContext | null;
|
|
2176
|
+
viewColumnItem(): ViewColumnItemContext[];
|
|
2177
|
+
viewColumnItem(i: number): ViewColumnItemContext | null;
|
|
2182
2178
|
COMMA(): antlr.TerminalNode[];
|
|
2183
2179
|
COMMA(i: number): antlr.TerminalNode | null;
|
|
2184
2180
|
get ruleIndex(): number;
|
|
@@ -2186,6 +2182,15 @@ export declare class ViewColumnsContext extends antlr.ParserRuleContext {
|
|
|
2186
2182
|
exitRule(listener: ImpalaSqlParserListener): void;
|
|
2187
2183
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2188
2184
|
}
|
|
2185
|
+
export declare class ViewColumnItemContext extends antlr.ParserRuleContext {
|
|
2186
|
+
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2187
|
+
columnNamePathCreate(): ColumnNamePathCreateContext;
|
|
2188
|
+
commentClause(): CommentClauseContext | null;
|
|
2189
|
+
get ruleIndex(): number;
|
|
2190
|
+
enterRule(listener: ImpalaSqlParserListener): void;
|
|
2191
|
+
exitRule(listener: ImpalaSqlParserListener): void;
|
|
2192
|
+
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2193
|
+
}
|
|
2189
2194
|
export declare class QueryStatementContext extends antlr.ParserRuleContext {
|
|
2190
2195
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2191
2196
|
queryNoWith(): QueryNoWithContext;
|
|
@@ -2252,11 +2257,11 @@ export declare class ColumnSpecContext extends antlr.ParserRuleContext {
|
|
|
2252
2257
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2253
2258
|
}
|
|
2254
2259
|
export declare class ColumnDefinitionContext extends antlr.ParserRuleContext {
|
|
2260
|
+
_colType?: TypeContext;
|
|
2255
2261
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2256
2262
|
columnNamePathCreate(): ColumnNamePathCreateContext;
|
|
2257
2263
|
type(): TypeContext;
|
|
2258
|
-
|
|
2259
|
-
stringLiteral(): StringLiteralContext | null;
|
|
2264
|
+
commentClause(): CommentClauseContext | null;
|
|
2260
2265
|
get ruleIndex(): number;
|
|
2261
2266
|
enterRule(listener: ImpalaSqlParserListener): void;
|
|
2262
2267
|
exitRule(listener: ImpalaSqlParserListener): void;
|
|
@@ -2271,13 +2276,13 @@ export declare class KuduTableElementContext extends antlr.ParserRuleContext {
|
|
|
2271
2276
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2272
2277
|
}
|
|
2273
2278
|
export declare class KuduColumnDefinitionContext extends antlr.ParserRuleContext {
|
|
2279
|
+
_colType?: TypeContext;
|
|
2274
2280
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2275
2281
|
columnNamePathCreate(): ColumnNamePathCreateContext;
|
|
2276
2282
|
type(): TypeContext;
|
|
2277
2283
|
kuduAttributes(): KuduAttributesContext[];
|
|
2278
2284
|
kuduAttributes(i: number): KuduAttributesContext | null;
|
|
2279
|
-
|
|
2280
|
-
stringLiteral(): StringLiteralContext | null;
|
|
2285
|
+
commentClause(): CommentClauseContext | null;
|
|
2281
2286
|
KW_PRIMARY(): antlr.TerminalNode | null;
|
|
2282
2287
|
KW_KEY(): antlr.TerminalNode | null;
|
|
2283
2288
|
get ruleIndex(): number;
|
|
@@ -2285,9 +2290,19 @@ export declare class KuduColumnDefinitionContext extends antlr.ParserRuleContext
|
|
|
2285
2290
|
exitRule(listener: ImpalaSqlParserListener): void;
|
|
2286
2291
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2287
2292
|
}
|
|
2293
|
+
export declare class CommentClauseContext extends antlr.ParserRuleContext {
|
|
2294
|
+
_comment?: StringLiteralContext;
|
|
2295
|
+
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2296
|
+
KW_COMMENT(): antlr.TerminalNode;
|
|
2297
|
+
stringLiteral(): StringLiteralContext;
|
|
2298
|
+
get ruleIndex(): number;
|
|
2299
|
+
enterRule(listener: ImpalaSqlParserListener): void;
|
|
2300
|
+
exitRule(listener: ImpalaSqlParserListener): void;
|
|
2301
|
+
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2302
|
+
}
|
|
2288
2303
|
export declare class ColumnSpecWithKuduContext extends antlr.ParserRuleContext {
|
|
2289
2304
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2290
|
-
columnSpec(): ColumnSpecContext
|
|
2305
|
+
columnSpec(): ColumnSpecContext;
|
|
2291
2306
|
kuduAttributes(): KuduAttributesContext[];
|
|
2292
2307
|
kuduAttributes(i: number): KuduAttributesContext | null;
|
|
2293
2308
|
get ruleIndex(): number;
|
|
@@ -2823,6 +2838,7 @@ export declare class SampleTypeContext extends antlr.ParserRuleContext {
|
|
|
2823
2838
|
accept<Result>(visitor: ImpalaSqlParserVisitor<Result>): Result | null;
|
|
2824
2839
|
}
|
|
2825
2840
|
export declare class AliasedRelationContext extends antlr.ParserRuleContext {
|
|
2841
|
+
_alias?: IdentifierContext;
|
|
2826
2842
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
2827
2843
|
relationPrimary(): RelationPrimaryContext;
|
|
2828
2844
|
identifier(): IdentifierContext | null;
|