[ https://issues.apache.org/jira/browse/HIVE-27234?focusedWorklogId=860461&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-860461 ]
ASF GitHub Bot logged work on HIVE-27234: ----------------------------------------- Author: ASF GitHub Bot Created on: 04/May/23 04:46 Start Date: 04/May/23 04:46 Worklog Time Spent: 10m Work Description: zhangbutao commented on code in PR #4216: URL: https://github.com/apache/hive/pull/4216#discussion_r1184536183 ########## parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g: ########## @@ -477,6 +478,34 @@ alterStatementSuffixExecute -> ^(TOK_ALTERTABLE_EXECUTE KW_SET_CURRENT_SNAPSHOT $snapshotParam) ; +alterStatementSuffixCreateBranch +@init { gParent.pushMsg("alter table create branch", state); } +@after { gParent.popMsg(state); } + : KW_CREATE KW_BRANCH branchName=identifier snapshotIdOfBranch? branchRetain? retentionOfSnapshots? + -> ^(TOK_ALTERTABLE_CREATE_BRANCH $branchName snapshotIdOfBranch? branchRetain? retentionOfSnapshots?) + ; + +snapshotIdOfBranch +@init { gParent.pushMsg("alter table create branch as of version", state); } Review Comment: done ########## parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g: ########## @@ -477,6 +478,34 @@ alterStatementSuffixExecute -> ^(TOK_ALTERTABLE_EXECUTE KW_SET_CURRENT_SNAPSHOT $snapshotParam) ; +alterStatementSuffixCreateBranch +@init { gParent.pushMsg("alter table create branch", state); } +@after { gParent.popMsg(state); } + : KW_CREATE KW_BRANCH branchName=identifier snapshotIdOfBranch? branchRetain? retentionOfSnapshots? + -> ^(TOK_ALTERTABLE_CREATE_BRANCH $branchName snapshotIdOfBranch? branchRetain? retentionOfSnapshots?) + ; + +snapshotIdOfBranch +@init { gParent.pushMsg("alter table create branch as of version", state); } +@after { gParent.popMsg(state); } + : KW_AS KW_OF KW_VERSION snapshotId=Number + -> ^(TOK_AS_OF_VERSION_BRANCH $snapshotId) Review Comment: done Issue Time Tracking ------------------- Worklog Id: (was: 860461) Time Spent: 6h 20m (was: 6h 10m) > Iceberg: CREATE BRANCH SQL implementation > ------------------------------------------ > > Key: HIVE-27234 > URL: https://issues.apache.org/jira/browse/HIVE-27234 > Project: Hive > Issue Type: Sub-task > Components: Iceberg integration > Reporter: zhangbutao > Assignee: zhangbutao > Priority: Major > Labels: pull-request-available > Time Spent: 6h 20m > Remaining Estimate: 0h > > Maybe we can follow spark sql about branch ddl implementation > [https://github.com/apache/iceberg/pull/6617] -- This message was sent by Atlassian Jira (v8.20.10#820010)