Skip to content

Commit

Permalink
feat(impala): update test unit
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyFBB committed Nov 23, 2023
1 parent 9dd12c4 commit e37d85e
Show file tree
Hide file tree
Showing 10 changed files with 2,096 additions and 1,988 deletions.
10 changes: 5 additions & 5 deletions src/grammar/impala/ImpalaSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ alterUnSetOrSetViewTblproperties: KW_ALTER KW_VIEW viewNamePath (KW_UNSET | KW_S

truncateTable: KW_TRUNCATE KW_TABLE? ifExists? tableNamePath;

describeStatement: KW_DESCRIBE KW_DATABASE? (KW_FORMATTED | KW_EXTENDED)? databaseNamePath;
describeStatement: KW_DESCRIBE KW_DATABASE? (KW_FORMATTED | KW_EXTENDED)? qualifiedName;

computeStatement
: computeStats
Expand Down Expand Up @@ -331,7 +331,7 @@ addComments

addDatabaseComments: KW_COMMENT KW_ON KW_DATABASE databaseNamePath KW_IS (stringLiteral | KW_NULL);

addTbaleComments: KW_COMMENT KW_ON KW_TABLE tableNamePath KW_IS (stringLiteral | KW_NULL);
addTbaleComments: KW_COMMENT KW_ON KW_TABLE tableNamePath KW_IS (stringLiteral | KW_NULL);

addColumnComments: KW_COMMENT KW_ON KW_COLUMN columnNamePath KW_IS (stringLiteral | KW_NULL);

Expand Down Expand Up @@ -376,7 +376,7 @@ viewNameCreate
| identifier (DOT identifier)?
;

functionNameCreate: identifier;
functionNameCreate: identifier | identifier (DOT identifier)?;

databaseNamePath: identifier;

Expand All @@ -390,7 +390,7 @@ viewNamePath
| identifier (DOT identifier)?
;

functionNamePath: identifier;
functionNamePath: identifier | identifier (DOT identifier)?;

columnNamePath
: identifier
Expand Down Expand Up @@ -719,7 +719,7 @@ primaryExpression
| KW_TRY_CAST LPAREN expression KW_AS type RPAREN #cast
| KW_ARRAY LSQUARE (expression (COMMA expression)*)? RSQUARE #arrayConstructor
| value=primaryExpression LSQUARE index=valueExpression RSQUARE #subscript
| identifier #columnReference
| columnNamePath #columnReference
| base=primaryExpression DOT fieldName=identifier #dereference
| name=KW_CURRENT_DATE #specialDateTimeFunction
| name=KW_CURRENT_TIME (LPAREN precision=INTEGER_VALUE RPAREN)? #specialDateTimeFunction
Expand Down
2 changes: 1 addition & 1 deletion src/lib/impala/ImpalaSqlParser.interp

Large diffs are not rendered by default.

Loading

0 comments on commit e37d85e

Please sign in to comment.