zhangbutao commented on code in PR #5190:
URL: https://github.com/apache/hive/pull/5190#discussion_r1560423490


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g:
##########
@@ -513,6 +514,13 @@ alterStatementSuffixRenameBranch
     -> ^(TOK_ALTERTABLE_RENAME_BRANCH $sourceBranch $targetBranch)
     ;
 
+alterStatementSuffixReplaceBranch
+@init { gParent.pushMsg("alter table replace branch", state); }
+@after { gParent.popMsg(state); }
+    : KW_REPLACE KW_BRANCH sourceBranch=Identifier KW_WITH KW_SNAPSHOT? 
(targetBranch=(Identifier | Number))

Review Comment:
   
https://iceberg.apache.org/docs/nightly/spark-ddl/#alter-table-replace-branch 
Spark-iceberg `replace branch` syntax has more properties, e.g.:
   ```
   -- REPLACE historical-tag to reference snapshot 4567 and update the 
retention to 60 days.
   ALTER TABLE prod.db.sample REPLACE TAG `historical-tag` AS OF VERSION 4567 
RETAIN 60 DAYS
   ```
   
   Any thought we need also to support these?



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

Reply via email to