rdblue commented on a change in pull request #3763:
URL: https://github.com/apache/iceberg/pull/3763#discussion_r773439325
##########
File path:
spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestDelete.java
##########
@@ -749,6 +772,46 @@ public void testDeleteRefreshesRelationCache() throws
NoSuchTableException {
spark.sql("UNCACHE TABLE tmp");
}
+ @Test
+ public void testDeleteWithMultipleSpecs() {
+ createAndInitTable("id INT, dep STRING, category STRING");
+
+ // write an unpartitioned file
+ append(tableName, "{ \"id\": 1, \"dep\": \"hr\", \"category\": \"c1\"}");
+
+ // write a file partitioned by dep
+ sql("ALTER TABLE %s ADD PARTITION FIELD dep", tableName);
+ append(tableName,
+ "{ \"id\": 1, \"dep\": \"hr\", \"category\": \"c1\" }\n" +
+ "{ \"id\": 2, \"dep\": \"hr\", \"category\": \"c1\" }");
+
+ // write a file partitioned by dep and category
+ sql("ALTER TABLE %s ADD PARTITION FIELD category", tableName);
+ append(tableName, "{ \"id\": 1, \"dep\": \"hr\", \"category\": \"c1\"}");
Review comment:
My point is just that it doesn't need to be the same record in all
places. That's why I suggested odds vs evens. If you use a different category
and ID, then delete all the odd ones you would end up with the same test
without the reader wondering why they all have the same ID.
--
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]