[
https://issues.apache.org/jira/browse/HIVE-27234?focusedWorklogId=860261&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-860261
]
ASF GitHub Bot logged work on HIVE-27234:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/May/23 10:07
Start Date: 03/May/23 10:07
Worklog Time Spent: 10m
Work Description: zhangbutao commented on code in PR #4216:
URL: https://github.com/apache/hive/pull/4216#discussion_r1183488456
##########
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:
As mentioned above, we can reuse `TOK_AS_OF_VERSION` if we use `FOR
SYSTEM_VERSION AS OF` instead of `AS OF VERSION`.
Issue Time Tracking
-------------------
Worklog Id: (was: 860261)
Time Spent: 5h 40m (was: 5.5h)
> 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: 5h 40m
> 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)