rdblue commented on code in PR #6371:
URL: https://github.com/apache/iceberg/pull/6371#discussion_r1053521508
##########
spark/v3.3/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestCopyOnWriteDelete.java:
##########
@@ -143,4 +148,32 @@ public synchronized void
testDeleteWithConcurrentTableRefresh() throws Exception
executorService.shutdown();
Assert.assertTrue("Timeout", executorService.awaitTermination(2,
TimeUnit.MINUTES));
}
+
+ @Test
+ public void testRuntimeFilteringWithReportedPartitioning() throws
NoSuchTableException {
+ createAndInitPartitionedTable();
+
+ append(new Employee(1, "hr"), new Employee(3, "hr"));
+ append(new Employee(1, "hardware"), new Employee(2, "hardware"));
+
+ Map<String, String> sqlConf =
+ ImmutableMap.of(
+ SQLConf.V2_BUCKETING_ENABLED().key(),
+ "true",
+ SparkSQLProperties.PRESERVE_DATA_GROUPING,
+ "true");
+
+ withSQLConf(sqlConf, () -> sql("DELETE FROM %s WHERE id = 2", tableName));
+
+ Table table = validationCatalog.loadTable(tableIdent);
+ Assert.assertEquals("Should have 3 snapshots", 3,
Iterables.size(table.snapshots()));
+
+ Snapshot currentSnapshot = table.currentSnapshot();
+ validateCopyOnWrite(currentSnapshot, "1", "1", "1");
Review Comment:
Nit: it would be nice to not pass the counts as strings...
--
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]