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


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g:
##########
@@ -558,13 +558,42 @@ alterStatementSuffixReplaceTag
     -> ^(TOK_ALTERTABLE_REPLACE_SNAPSHOTREF KW_TAG $sourceBranch $snapshotId 
refRetain?)
     ;
 
+dropBranchStatement
+@init { gParent.pushMsg("alter table drop branch (if exists) branchName", 
state); }
+@after { gParent.popMsg(state); }
+    : KW_DROP KW_BRANCH ifExists? branchName=identifier KW_FROM tableName
+    -> ^(TOK_ALTERTABLE tableName
+     ^(TOK_ALTERTABLE_DROP_BRANCH ifExists? $branchName)
+     )

Review Comment:
   Sounds cool but I don't think Hive is anyway near supporting that. But just 
casually thinking it might not be a naive task to implement. need to see how 
Trino did it.
   
   Do you think having From isn't good, or are you ok with the current syntax 
proposed 



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to