kinolaev commented on code in PR #18507:
URL: https://github.com/apache/iceberg/pull/18507#discussion_r4285230722
##########
flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/dynamic/TestDynamicTableUpdateOperator.java:
##########
@@ -120,6 +121,41 @@ void testDynamicTableUpdateOperatorSchemaChange() throws
Exception {
assertThat(catalog.loadTable(table).schema().schemaId()).isEqualTo(output.schema().schemaId());
}
+ @Test
+ void testEqualityFieldIdsRemappedToTableSchema() throws Exception {
+ Catalog catalog = CATALOG_EXTENSION.catalog();
+ TableIdentifier table = TableIdentifier.of(TABLE);
+
+ DynamicTableUpdateOperator operator =
+ new DynamicTableUpdateOperator(
+ CATALOG_EXTENSION.catalogLoader(),
+ TableCreator.DEFAULT,
+ flinkDynamicSinkConfiguration(CASE_SENSITIVE, PRESERVE_COLUMNS));
+ operator.open(null);
+
+ catalog.createTable(table, SCHEMA1);
+ Schema inputSchema =
+ new Schema(
+ Types.NestedField.required(2, "id", Types.IntegerType.get()),
+ Types.NestedField.optional(1, "data", Types.StringType.get()));
+ Types.NestedField equalityField = inputSchema.findField("id");
+ DynamicRecordInternal input =
+ new DynamicRecordInternal(
+ TABLE,
+ "branch",
+ inputSchema,
+ GenericRowData.of(StringData.fromString("test"), 1),
Review Comment:
Fixed in c76742068054a7b9017e3625c6e4cf3f873dfc44.
--
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]