thswlsqls opened a new pull request, #17327: URL: https://github.com/apache/iceberg/pull/17327
Closes #17325 ## Summary - `RecordUtils.createTableWriter()` looked up the per-table config with `identifier().name()`, dropping the namespace. - `IcebergSinkConfig.tableConfig(String)` builds the prefix `"iceberg.table." + tableName + "."`, so for `default.events` the lookup used `iceberg.table.events.` and never matched `iceberg.table.default.events.id-columns`. - It silently fell back to `iceberg.tables.default-id-columns`. With no default set, an append writer was built instead of an equality delete writer, so upserts piled up duplicate rows with no error. - Fixed by looking up with `identifier().toString()`, matching the three other call sites on this config map (`Coordinator.commitToTable()` line 260, `IcebergWriterFactory` line 101, `SinkWriter` line 111), left untouched. - Backward compatible: `TableIdentifier.toString()` returns `name` when there is no namespace. - `docs/docs/kafka-connect.md` line 76 documents this key as `iceberg.table.<table-name>.id-columns`, with namespaced examples. - Regression from #14979 (`d85f8a87a`), which replaced `String tableName` with `TableReference`. ## Testing done - Added `TestRecordUtils#createTableWriterReadsIdColumnsForNamespacedTable`: a real `IcebergSinkConfig` sets `iceberg.table.default.events.id-columns` to a column missing from the schema, so `createTableWriter` must throw `IllegalArgumentException`. - Verified red→green: no exception on unfixed code, throws after the fix. - `./gradlew :iceberg-kafka-connect:iceberg-kafka-connect:check` — passed, 126 tests, 0 failures. - REVAPI not applicable: kafka-connect is not published API. -- 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]
