[
https://issues.apache.org/jira/browse/HIVE-26228?focusedWorklogId=774431&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-774431
]
ASF GitHub Bot logged work on HIVE-26228:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 25/May/22 09:06
Start Date: 25/May/22 09:06
Worklog Time Spent: 10m
Work Description: pvary commented on code in PR #3287:
URL: https://github.com/apache/hive/pull/3287#discussion_r881410490
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergTimeTravel.java:
##########
@@ -20,31 +20,35 @@
package org.apache.iceberg.mr.hive;
import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
import java.util.List;
import org.apache.iceberg.AssertHelpers;
import org.apache.iceberg.HistoryEntry;
import org.apache.iceberg.Table;
import org.junit.Assert;
import org.junit.Test;
+import static
org.apache.iceberg.mr.hive.HiveIcebergTestUtils.timestampAfterSnapshot;
+
/**
* Tests covering the time travel feature, aka reading from a table as of a
certain snapshot.
*/
public class TestHiveIcebergTimeTravel extends
HiveIcebergStorageHandlerWithEngineBase {
@Test
public void testSelectAsOfTimestamp() throws IOException,
InterruptedException {
- Table table = prepareTableWithVersions(2);
+ Table table = testTables.createTableWithVersions(shell, "customers",
+ HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
+ fileFormat, HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, 2);
List<Object[]> rows = shell.executeStatement(
- "SELECT * FROM customers FOR SYSTEM_TIME AS OF '" +
timestampAfterSnapshot(table, 0) + "'");
+ "SELECT * FROM customers FOR SYSTEM_TIME AS OF '" +
Review Comment:
What is the change here?
Issue Time Tracking
-------------------
Worklog Id: (was: 774431)
Time Spent: 3h 10m (was: 3h)
> 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: 3h 10m
> 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)