dramaticlly commented on code in PR #8289:
URL: https://github.com/apache/iceberg/pull/8289#discussion_r1291762545
##########
spark/v3.4/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFilesProcedure.java:
##########
@@ -41,19 +41,30 @@ public TestRewritePositionDeleteFilesProcedure(
}
private void createTable() throws Exception {
+ createTable(false);
+ }
+
+ private void createTable(boolean partitioned) throws Exception {
+ String partitionStmt = partitioned ? "PARTITIONED BY (id)" : "";
Review Comment:
maybe pass in partitionStatement instead of boolean? It seems more
straightforward imo
##########
spark/v3.4/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFilesProcedure.java:
##########
@@ -130,6 +141,42 @@ public void testExpireDeleteFilesNoOption() throws
Exception {
output);
}
+ @Test
+ public void testExpireDeleteFilesFilter() throws Exception {
+ createTable(true);
+
+ sql("DELETE FROM %s WHERE data='a'", tableName);
+ sql("DELETE FROM %s WHERE data='c'", tableName);
+ sql("DELETE FROM %s WHERE data='e'", tableName);
Review Comment:
if we delete `a, b, e` instead, does it imply we will generate 3 delete
files first and compaction with where clause `id IN (1, 2)` would remove 2 and
add 1 back?
--
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]