Skip to content

Commit

Permalink
fix(impala): fix syntax suggestion unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyFBB committed Nov 28, 2023
1 parent 843a8b8 commit 8ae2ab3
Show file tree
Hide file tree
Showing 5 changed files with 2,836 additions and 3,138 deletions.
41 changes: 15 additions & 26 deletions src/grammar/impala/ImpalaSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ alterUnSetOrSetViewTblproperties: KW_ALTER KW_VIEW viewNamePath (KW_UNSET | KW_S

truncateTableStatement: KW_TRUNCATE KW_TABLE? ifExists? tableNamePath;

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

computeStatement
: computeStats
Expand Down Expand Up @@ -356,39 +356,23 @@ ifNotExists
: KW_IF KW_NOT KW_EXISTS
;

tableNameCreate
: identifier
| identifier (DOT identifier)?
;
tableNameCreate: qualifiedName;

databaseNameCreate: identifier;
databaseNameCreate: qualifiedName;

viewNameCreate
: identifier
| identifier (DOT identifier)?
;
viewNameCreate: qualifiedName;

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

databaseNamePath: identifier;
databaseNamePath: qualifiedName;

tableNamePath
: identifier
| identifier (DOT identifier)?
;
tableNamePath: qualifiedName;

viewNamePath
: identifier
| identifier (DOT identifier)?
;
viewNamePath: qualifiedName;

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

columnNamePath
: identifier
| identifier (DOT identifier)?
| identifier DOT identifier (DOT identifier)?
;
columnNamePath: qualifiedName;

tableOrViewPath: tableNamePath | viewNamePath;

Expand Down Expand Up @@ -942,4 +926,9 @@ nonReserved
| KW_VIEWS
| KW_YEAR
| KW_DEFAULT
| KW_TEXTFILE
| KW_ORC
| KW_AVRO
| KW_SEQUENCEFILE
| KW_RCFILE
;
2 changes: 1 addition & 1 deletion src/lib/impala/ImpalaSqlParser.interp

Large diffs are not rendered by default.

Loading

0 comments on commit 8ae2ab3

Please sign in to comment.