Skip to content

Commit

Permalink
refactor: optimize the use of tableName and viewName for
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyi committed Oct 17, 2023
1 parent 200c75c commit ed451fe
Show file tree
Hide file tree
Showing 3 changed files with 4,553 additions and 4,586 deletions.
10 changes: 5 additions & 5 deletions src/grammar/spark/SparkSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ statement
| KW_ALTER KW_TABLE tableName
KW_DROP (KW_COLUMN | KW_COLUMNS) (ifExists)?
multipartIdentifierList
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
KW_RENAME KW_TO multipartIdentifier
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
KW_SET KW_TBLPROPERTIES propertyList
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
KW_UNSET KW_TBLPROPERTIES (ifExists)? propertyList
| KW_ALTER KW_TABLE table=tableName
(KW_ALTER | KW_CHANGE) KW_COLUMN? column=multipartIdentifier
Expand All @@ -124,11 +124,11 @@ statement
KW_SET KW_SERDE stringLit (KW_WITH KW_SERDEPROPERTIES propertyList)?
| KW_ALTER KW_TABLE tableName (partitionSpec)?
KW_SET KW_SERDEPROPERTIES propertyList
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName) KW_ADD (ifNotExists)?
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName) KW_ADD (ifNotExists)?
partitionSpecLocation+
| KW_ALTER KW_TABLE tableName
partitionSpec KW_RENAME KW_TO partitionSpec
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
KW_DROP (ifExists)? partitionSpec (COMMA partitionSpec)* KW_PURGE?
| KW_ALTER KW_TABLE tableName
(partitionSpec)? KW_SET locationSpec
Expand Down
2 changes: 1 addition & 1 deletion src/lib/spark/SparkSqlParser.interp

Large diffs are not rendered by default.

Loading

0 comments on commit ed451fe

Please sign in to comment.