viirya commented on a change in pull request #26338: [SPARK-29680][SQL] Remove
ALTER TABLE CHANGE COLUMN syntax
URL: https://github.com/apache/spark/pull/26338#discussion_r342652825
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -149,11 +149,8 @@ statement
| ALTER (TABLE | VIEW) multipartIdentifier
UNSET TBLPROPERTIES (IF EXISTS)? tablePropertyList
#unsetTableProperties
| ALTER TABLE multipartIdentifier
- (ALTER | CHANGE) COLUMN? qualifiedName
+ (ALTER | CHANGE) COLUMN? multipartIdentifier
Review comment:
Previously we use `qualifiedName: identifier ('.' identifier)*` to capture
column name.
This conflicts a test in ErrorParserSuite that `test-col` is not allowed in
`ALTER TABLE t CHANGE COLUMN test-col TYPE BIGINT`.
The column name should be multiple errorCapturingIdentifier. So I changed it
to multipartIdentifier:
```
multipartIdentifier
: parts+=errorCapturingIdentifier ('.' parts+=errorCapturingIdentifier)*
;
```
@cloud-fan
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]