jackye1995 commented on code in PR #6638:
URL: https://github.com/apache/iceberg/pull/6638#discussion_r1083380371
##########
spark/v3.3/spark-extensions/src/main/antlr/org.apache.spark.sql.catalyst.parser.extensions/IcebergSqlExtensions.g4:
##########
@@ -74,6 +74,7 @@ statement
| ALTER TABLE multipartIdentifier SET IDENTIFIER_KW FIELDS fieldList
#setIdentifierFields
| ALTER TABLE multipartIdentifier DROP IDENTIFIER_KW FIELDS fieldList
#dropIdentifierFields
| ALTER TABLE multipartIdentifier CREATE BRANCH identifier (AS OF VERSION
snapshotId)? (RETAIN snapshotRefRetain snapshotRefRetainTimeUnit)?
(snapshotRetentionClause)? #createBranch
+ | ALTER TABLE multipartIdentifier REPLACE BRANCH identifier (AS OF VERSION
snapshotId)? (RETAIN snapshotRefRetain snapshotRefRetainTimeUnit)?
(snapshotRetentionClause)? #replaceBranch
Review Comment:
Agree, I think in this case there are a few arguments for combining it:
1. syntax is exactly the same, and adding replace does not complicate the
logic too much
2. CREATE/REPLACE table follows a similar pattern
3. At API level, we also have similar thing like
`createOrReplaceTableTransaction`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]