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


##########
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:
   IMO, FROM is the best name to refer to a table name. Trino probably reserves 
it to add `CREATE BRANCH x IN TABLE tbl FROM other_branch_name`. For me, it is 
more straightforward and consistent to support it as `CREATE BRANCH x FROM 
cat.db.tbl.branch_x`. No objection.
   
   
https://docs.google.com/document/d/1jEF4IkWu-2Gzk5ii2Nb0exuEnAUeo98UbiM3i0xtgWQ/edit?tab=t.0#heading=h.dglxb51zw9m2



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