rdblue commented on a change in pull request #2365:
URL: https://github.com/apache/iceberg/pull/2365#discussion_r602639165



##########
File path: 
spark3-extensions/src/main/antlr/org.apache.spark.sql.catalyst.parser.extensions/IcebergSqlExtensions.g4
##########
@@ -69,6 +69,7 @@ statement
     : CALL multipartIdentifier '(' (callArgument (',' callArgument)*)? ')'     
             #call
     | ALTER TABLE multipartIdentifier ADD PARTITION FIELD transform (AS 
name=identifier)?   #addPartitionField
     | ALTER TABLE multipartIdentifier DROP PARTITION FIELD transform           
             #dropPartitionField
+    | ALTER TABLE multipartIdentifier REPLACE PARTITION FIELD transform TO 
transform (AS name=identifier)? #replacePartitionField

Review comment:
       I think you make a good argument that names should not be reused. If the 
caller wants to use the same name, then it isn't hard to put the name twice: 
`REPLACE shard WITH bucket(32, id) AS shard`. Then all we need to support is 
drop and add with the same name. I think that's simpler to implement and works 
well.




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to