You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 22:32:46 UTC

[GitHub] [spark] huaxingao commented on a change in pull request #26303: [SPARK-29643][SQL] ALTER TABLE (DROP PARTITION) should look up catalog/table like v2 commands

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org