aokolnychyi commented on code in PR #7424:
URL: https://github.com/apache/iceberg/pull/7424#discussion_r1176787655
##########
spark/v3.4/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestStoragePartitionedJoinsInRowLevelOperations.java:
##########
@@ -257,14 +261,22 @@ private void checkMerge(RowLevelOperationMode mode) {
SparkPlan plan =
executeAndKeepPlan(
"MERGE INTO %s AS t USING %s AS s "
- + "ON t.id = s.id AND t.dep = s.dep AND t.dep = 'hr'"
+ + "ON t.id = s.id AND t.dep = s.dep "
+ "WHEN MATCHED THEN "
+ " UPDATE SET t.salary = s.salary "
+ "WHEN NOT MATCHED THEN "
+ " INSERT *",
tableName, tableName(OTHER_TABLE_NAME));
String planAsString = plan.toString();
- Assert.assertFalse("Should be no shuffles with SPJ",
planAsString.contains("Exchange"));
+ if (mode == COPY_ON_WRITE) {
+ int actualNumShuffles = StringUtils.countMatches(planAsString,
"Exchange");
+ Assert.assertEquals("Should be 1 shuffle with SPJ", 1,
actualNumShuffles);
+ Assert.assertTrue(
Review Comment:
Thanks, @nastra! Updated.
--
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]