aokolnychyi commented on code in PR #6371: URL: https://github.com/apache/iceberg/pull/6371#discussion_r1053563618
########## 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: This is what we did historically to simplify the validation as we compare summary map (i.e. strings). I'll check. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org