[
https://issues.apache.org/jira/browse/HIVE-26228?focusedWorklogId=770725&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-770725
]
ASF GitHub Bot logged work on HIVE-26228:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/May/22 09:28
Start Date: 16/May/22 09:28
Worklog Time Spent: 10m
Work Description: pvary commented on code in PR #3287:
URL: https://github.com/apache/hive/pull/3287#discussion_r873514500
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/execute/rollback/AlterTableRollbackDesc.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.ddl.table.execute.rollback;
+
+import org.apache.hadoop.hive.common.TableName;
+import org.apache.hadoop.hive.ql.ddl.table.AbstractAlterTableDesc;
+import org.apache.hadoop.hive.ql.ddl.table.AlterTableType;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.Explain;
+import org.apache.hadoop.hive.ql.plan.Explain.Level;
+
+import java.util.Map;
+
+@Explain(displayName = "Rollback To Snapshot", explainLevels = { Level.USER,
Level.DEFAULT, Level.EXTENDED})
+public class AlterTableRollbackDesc extends AbstractAlterTableDesc {
Review Comment:
Shouldn't we add the timestamp/snapshotId to the Desc?
We can write it out in the describe, and we can use it when executing the
command
Issue Time Tracking
-------------------
Worklog Id: (was: 770725)
Time Spent: 1h 20m (was: 1h 10m)
> 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 20m
> 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)