[
https://issues.apache.org/jira/browse/HIVE-27234?focusedWorklogId=859793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-859793
]
ASF GitHub Bot logged work on HIVE-27234:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Apr/23 17:19
Start Date: 29/Apr/23 17:19
Worklog Time Spent: 10m
Work Description: zhangbutao commented on code in PR #4216:
URL: https://github.com/apache/hive/pull/4216#discussion_r1181104982
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -676,6 +678,32 @@ public void
executeOperation(org.apache.hadoop.hive.ql.metadata.Table hmsTable,
}
}
+ @Override
+ public void createBranchOperation(org.apache.hadoop.hive.ql.metadata.Table
hmsTable,
+ AlterTableCreateBranchSpec createBranchSpec) {
+ TableDesc tableDesc = Utilities.getTableDesc(hmsTable);
+ Table icebergTable = IcebergTableUtil.getTable(conf,
tableDesc.getProperties());
+
+ String branchName = createBranchSpec.getBranchName();
+ ManageSnapshots manageSnapshots = icebergTable.manageSnapshots();
+ Long snapShotId = Optional.ofNullable(createBranchSpec.getSnapshotId())
+ .orElse(icebergTable.currentSnapshot().snapshotId());
Review Comment:
Nice catch! fixed. Thanks very much!
Issue Time Tracking
-------------------
Worklog Id: (was: 859793)
Time Spent: 3h 20m (was: 3h 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: 3h 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)