[
https://issues.apache.org/jira/browse/HIVE-26228?focusedWorklogId=770850&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-770850
]
ASF GitHub Bot logged work on HIVE-26228:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/May/22 14:07
Start Date: 16/May/22 14:07
Worklog Time Spent: 10m
Work Description: marton-bod commented on code in PR #3287:
URL: https://github.com/apache/hive/pull/3287#discussion_r873772303
##########
parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:
##########
@@ -214,6 +214,7 @@ TOK_ALTERTABLE_ADDCONSTRAINT;
TOK_ALTERTABLE_UPDATECOLUMNS;
TOK_ALTERTABLE_OWNER;
TOK_ALTERTABLE_SETPARTSPEC;
+TOK_ALTERTABLE_ROLLBACK;
Review Comment:
Have you considered making the function name a parameter instead of a
keyword?
e.g. `ALTER TABLE tbl EXECUTE 'rollback'`
This could provide the flexibility of the stored procedures used in Spark,
allowing you to reuse the syntax for the other operations (expire_snapshot,
rewrite_manifests, etc) in the future. The storage handler could specify which
exact 'stored procedures' it supports, and throw an exception if it's
unsupported for the table type.
Just an idea, let me know your thoughts.
Issue Time Tracking
-------------------
Worklog Id: (was: 770850)
Time Spent: 1h 50m (was: 1h 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: 1h 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)