ayushtkn commented on code in PR #5222:
URL: https://github.com/apache/hive/pull/5222#discussion_r1587033220


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTagExec.java:
##########
@@ -64,4 +64,13 @@ public static void dropTag(Table table, 
AlterTableSnapshotRefSpec.DropSnapshotRe
       table.manageSnapshots().removeTag(tagName).commit();
     }
   }
+
+  public static void replaceTag(Table table, 
AlterTableSnapshotRefSpec.ReplaceSnapshotrefSpec replaceTagRefSpec) {
+    String sourceTag = replaceTagRefSpec.getSourceRefName();
+    long targetSnapshot = replaceTagRefSpec.getTargetSnapshot();
+    LOG.info("Replacing tag {} with snapshot {} on iceberg table {}", 
sourceTag, targetSnapshot, table.name());
+    ManageSnapshots manageSnapshots = 
table.manageSnapshots().replaceTag(sourceTag, targetSnapshot);
+    IcebergBranchExec.setOptionalReplaceParams(replaceTagRefSpec, 
manageSnapshots, sourceTag);

Review Comment:
   If I got you right, I will do [1] in the next iter & merge the classes as 
suggested as ``IcebergSnapshotRefExec``



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to