[
https://issues.apache.org/jira/browse/HIVE-26228?focusedWorklogId=770714&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-770714
]
ASF GitHub Bot logged work on HIVE-26228:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/May/22 09:05
Start Date: 16/May/22 09:05
Worklog Time Spent: 10m
Work Description: pvary commented on code in PR #3287:
URL: https://github.com/apache/hive/pull/3287#discussion_r873492496
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergTimeTravel.java:
##########
@@ -36,15 +34,19 @@ public class TestHiveIcebergTimeTravel extends
HiveIcebergStorageHandlerWithEngi
@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 '" +
+ HiveIcebergTestUtils.timestampAfterSnapshot(table, 0) + "'");
Review Comment:
nit: maybe static import the method, and then there is less code and code
change?
Issue Time Tracking
-------------------
Worklog Id: (was: 770714)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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)