nastra commented on code in PR #8948:
URL: https://github.com/apache/iceberg/pull/8948#discussion_r1376207854
##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMerge.java:
##########
@@ -865,23 +864,23 @@ public void
testMergeWithMultipleUpdatesForTargetRowSmallTargetLargeSource() {
Dataset<Integer> ds = spark.createDataset(sourceIds, Encoders.INT());
ds.union(ds).createOrReplaceTempView("source");
- String errorMsg = "a single row from the target table with multiple rows
of the source table";
- AssertHelpers.assertThrowsCause(
- "Should complain about multiple matches",
- SparkRuntimeException.class,
- errorMsg,
- () -> {
- sql(
- "MERGE INTO %s AS t USING source AS s "
- + "ON t.id == s.value "
- + "WHEN MATCHED AND t.id = 1 THEN "
- + " UPDATE SET id = 10 "
- + "WHEN MATCHED AND t.id = 6 THEN "
- + " DELETE "
- + "WHEN NOT MATCHED AND s.value = 2 THEN "
- + " INSERT (id, dep) VALUES (s.value, null)",
- commitTarget());
- });
+ String errorMsg = "MERGE statement matched a single row from the target
table with multiple rows of the source table.";
+ Assertions.assertThatThrownBy(
+ () -> {
Review Comment:
no need for the wrapping {}
--
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]