huaxingao commented on a change in pull request #26303: [SPARK-29643][SQL]
ALTER TABLE (DROP PARTITION) should look up catalog/table like v2 commands
URL: https://github.com/apache/spark/pull/26303#discussion_r340889336
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -164,7 +164,7 @@ statement
partitionSpec+
#addTablePartition
| ALTER TABLE tableIdentifier
from=partitionSpec RENAME TO to=partitionSpec
#renameTablePartition
- | ALTER TABLE tableIdentifier
+ | ALTER TABLE multipartIdentifier
DROP (IF EXISTS)? partitionSpec (',' partitionSpec)* PURGE?
#dropTablePartitions
| ALTER VIEW tableIdentifier
Review comment:
```ALTER TABLE ... DROP PARTITION``` has an optional ```PURGE``` in the end,
but ```ALTER TABLE``` doesn't. I guess keep them separated? They use the same
parser rule, though.
----------------------------------------------------------------
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]