ayushtkn commented on code in PR #4441:
URL: https://github.com/apache/hive/pull/4441#discussion_r1260107439
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergExpireSnapshots.java:
##########
@@ -42,4 +43,26 @@ public void testExpireSnapshotsWithTimestamp() throws
IOException, InterruptedEx
table.refresh();
Assert.assertEquals(2, table.history().size());
}
+
+ @Test
+ public void testExpireSnapshotsWithSnapshotId() throws IOException,
InterruptedException {
+ TableIdentifier identifier = TableIdentifier.of("default", "source");
+ Table table = testTables.createTableWithVersions(shell, identifier.name(),
+ HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA, fileFormat,
+ HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, 10);
+ Assert.assertEquals(10, IterableUtils.size(table.snapshots()));
+
+ // Expire one snapshot
+ shell.executeStatement(
+ "ALTER TABLE " + identifier.name() + " EXECUTE EXPIRE_SNAPSHOTS" +
Review Comment:
we already have a syntax in place, discussed offline, we can keep it same
for now & explore an alt in another ticket
--
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]