kbendick commented on code in PR #4541:
URL: https://github.com/apache/iceberg/pull/4541#discussion_r847897627
##########
flink/v1.13/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java:
##########
@@ -210,33 +189,7 @@ public void testPrimaryKeyFieldsAtBeginningOfSchema() {
"PARTITIONED BY (data) WITH %s",
tableName, toWithClause(tableUpsertProps));
- sql("INSERT INTO %s VALUES " +
- "('aaa', DATE '2022-03-01', 1)," +
- "('aaa', DATE '2022-03-01', 2)," +
- "('bbb', DATE '2022-03-01', 3)",
- tableName);
-
- TestHelpers.assertRows(
- sql("SELECT * FROM %s", tableName),
- Lists.newArrayList(Row.of("aaa", dt, 2), Row.of("bbb", dt, 3)));
-
- sql("INSERT INTO %s VALUES " +
- "('aaa', DATE '2022-03-01', 4)," +
- "('bbb', DATE '2022-03-01', 5)",
- tableName);
-
- TestHelpers.assertRows(
- sql("SELECT * FROM %s", tableName),
- Lists.newArrayList(Row.of("aaa", dt, 4), Row.of("bbb", dt, 5)));
-
- sql("INSERT INTO %s VALUES " +
- "('aaa', DATE '2022-03-01', 6)," +
- "('bbb', DATE '2022-03-01', 7)",
- tableName);
-
- TestHelpers.assertRows(
- sql("SELECT * FROM %s", tableName),
- Lists.newArrayList(Row.of("aaa", dt, 6), Row.of("bbb", dt, 7)));
+ testUpsert(tableName, row -> Row.of(row.getField(1), dt,
row.getField(0)));
Review Comment:
In my experience, when tests have failed, when of the indicators is that one
or more of the resulting `Row`s will have extra fields.
So is mapping into specific Row fields possibly making it more likely that
we will miss those things?
--
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]