modify sparkSql grammar
This commit is contained in:
parent
8418c42c26
commit
084efe1aab
@ -75,7 +75,11 @@ program
|
||||
;
|
||||
|
||||
singleStatement
|
||||
: statement ';'* EOF
|
||||
: (statement SEMICOLON? | emptyStatement)*
|
||||
;
|
||||
|
||||
emptyStatement
|
||||
: SEMICOLON
|
||||
;
|
||||
|
||||
singleExpression
|
||||
@ -1741,6 +1745,7 @@ AMPERSAND: '&';
|
||||
PIPE: '|';
|
||||
CONCAT_PIPE: '||';
|
||||
HAT: '^';
|
||||
SEMICOLON: ';';
|
||||
|
||||
STRING
|
||||
: '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,15 @@ SparkSqlListener.prototype.exitSingleStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlListener.prototype.enterEmptyStatement = function(ctx) {
|
||||
};
|
||||
|
||||
// Exit a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlListener.prototype.exitEmptyStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Enter a parse tree produced by SparkSqlParser#singleExpression.
|
||||
SparkSqlListener.prototype.enterSingleExpression = function(ctx) {
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -24,6 +24,12 @@ SparkSqlVisitor.prototype.visitSingleStatement = function(ctx) {
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by SparkSqlParser#emptyStatement.
|
||||
SparkSqlVisitor.prototype.visitEmptyStatement = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
};
|
||||
|
||||
|
||||
// Visit a parse tree produced by SparkSqlParser#singleExpression.
|
||||
SparkSqlVisitor.prototype.visitSingleExpression = function(ctx) {
|
||||
return this.visitChildren(ctx);
|
||||
|
@ -282,7 +282,6 @@ SELECT * FROM t2;`,
|
||||
`SHOW PARTITIONS customer;`,
|
||||
`SHOW PARTITIONS customer PARTITION (city = 'San Jose');`,
|
||||
`SHOW TABLE EXTENDED LIKE 'employee';`,
|
||||
// `SHOW TABLE EXTENDED IN default LIKE 'empl*' PARTITION ('grade=1');`,
|
||||
`SHOW TABLES;`,
|
||||
`SHOW TABLES FROM userdb;`,
|
||||
`SHOW TABLES LIKE 'sam*|suj';`,
|
||||
|
Loading…
Reference in New Issue
Block a user