rdblue commented on a change in pull request #2185:
URL: https://github.com/apache/iceberg/pull/2185#discussion_r567103329
##########
File path:
spark3-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMerge.java
##########
@@ -48,8 +48,77 @@ public void removeTables() {
sql("DROP TABLE IF EXISTS source");
}
- // TODO: tests for reordering when operations succeed (both insert and
update actions)
- // TODO: tests for subqueries in conditions
+ @Test
+ public void testMergeAlignsUpdateAndInsertActions() {
+ createAndInitTable("id INT, a INT, b STRING", "{ \"id\": 1, \"a\": 2,
\"b\": \"3\" }");
+ createOrReplaceView("source",
+ "{ \"id\": 1, \"c1\": -2, \"c2\": \"-3\" }\n" +
+ "{ \"id\": 2, \"c1\": -20, \"c2\": \"-30\" }");
Review comment:
I think it would be easier to read if the strings were real strings and
not numbers. If they are numbers, then I need to think about the additional
concern of whether the type matches. Because I don't see a string, I don't
associated each value with a particular column so I just have additional
concerns in my head.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]