rdblue commented on a change in pull request #3763:
URL: https://github.com/apache/iceberg/pull/3763#discussion_r772007269
##########
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:
This test would be a lot more readable if the rows were unique rather
than reusing id=1 in several of them.
--
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]