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


##########
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:
   So, I will change the syntax like:
   ```
   ALTER TABLE prod.db.sample REPLACE BRANCH audit-branch
   AS OF SYSTEM_VERSION 4567 RETAIN 60 DAYS
   ```
   and for branch
   ```
   ALTER TABLE prod.db.sample REPLACE BRANCH audit-branch
   AS OF BRANCH branch-2 RETAIN 60 DAYS
   ```
   
   I think we are not using version but system_version everywhere.



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