Skip to content

Commit 0d9d3d6

Browse files
authored
test: accurate description (DTStack#183)
* test: accurate description * refactor: optimize the use of tableName and viewName for --------- Co-authored-by: liuyi <liuyi@dtstack.com>
1 parent f9dbd9f commit 0d9d3d6

22 files changed

+4572
-4605
lines changed

src/grammar/spark/SparkSqlParser.g4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ statement
104104
| KW_ALTER KW_TABLE tableName
105105
KW_DROP (KW_COLUMN | KW_COLUMNS) (ifExists)?
106106
multipartIdentifierList
107-
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
107+
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
108108
KW_RENAME KW_TO multipartIdentifier
109-
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
109+
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
110110
KW_SET KW_TBLPROPERTIES propertyList
111-
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
111+
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
112112
KW_UNSET KW_TBLPROPERTIES (ifExists)? propertyList
113113
| KW_ALTER KW_TABLE table=tableName
114114
(KW_ALTER | KW_CHANGE) KW_COLUMN? column=multipartIdentifier
@@ -124,11 +124,11 @@ statement
124124
KW_SET KW_SERDE stringLit (KW_WITH KW_SERDEPROPERTIES propertyList)?
125125
| KW_ALTER KW_TABLE tableName (partitionSpec)?
126126
KW_SET KW_SERDEPROPERTIES propertyList
127-
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName) KW_ADD (ifNotExists)?
127+
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName) KW_ADD (ifNotExists)?
128128
partitionSpecLocation+
129129
| KW_ALTER KW_TABLE tableName
130130
partitionSpec KW_RENAME KW_TO partitionSpec
131-
| KW_ALTER (KW_TABLE | KW_VIEW) (tableName | viewName)
131+
| KW_ALTER (KW_TABLE tableName | KW_VIEW viewName)
132132
KW_DROP (ifExists)? partitionSpec (COMMA partitionSpec)* KW_PURGE?
133133
| KW_ALTER KW_TABLE tableName
134134
(partitionSpec)? KW_SET locationSpec

src/lib/spark/SparkSqlParser.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)