[
https://issues.apache.org/jira/browse/HIVE-26228?focusedWorklogId=773505&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773505
]
ASF GitHub Bot logged work on HIVE-26228:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/May/22 14:15
Start Date: 23/May/22 14:15
Worklog Time Spent: 10m
Work Description: lcspinter commented on code in PR #3287:
URL: https://github.com/apache/hive/pull/3287#discussion_r879508204
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -425,6 +425,15 @@ public void
commitAlterTable(org.apache.hadoop.hive.metastore.api.Table hmsTable
case SETPARTITIONSPEC:
IcebergTableUtil.updateSpec(conf, icebergTable);
break;
+ case ROLLBACK:
+ LOG.info("Executing rollback operation on iceberg table. If you
would like to revert rollback you could " +
Review Comment:
Yes and no :)
Iceberg rollback creates a new snapshot, but it also keeps the historical
evolution. It is easier to understand through an example.
Lets have the following snapshots:
A -> B -> C -> D
After a rollback to let's say B, the snapshot chain will look like
A -> E
where E will be a new snapshot, but all it's properties (except for the ID)
will match B snapshot's properties.
Issue Time Tracking
-------------------
Worklog Id: (was: 773505)
Time Spent: 2h (was: 1h 50m)
> Implement Iceberg table rollback feature
> ----------------------------------------
>
> Key: HIVE-26228
> URL: https://issues.apache.org/jira/browse/HIVE-26228
> Project: Hive
> Issue Type: New Feature
> Reporter: László Pintér
> Assignee: László Pintér
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> We should allow rolling back iceberg table's data to the state at an older
> table snapshot.
> Rollback to the last snapshot before a specific timestamp
> {code:java}
> ALTER TABLE ice_t EXECUTE ROLLBACK('2022-05-12 00:00:00')
> {code}
> Rollback to a specific snapshot ID
> {code:java}
> ALTER TABLE ice_t EXECUTE ROLLBACK(1111);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)