ebyhr commented on code in PR #17152:
URL: https://github.com/apache/iceberg/pull/17152#discussion_r3558414633


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordUtils.java:
##########
@@ -114,7 +114,7 @@ public static TaskWriter<Record> createTableWriter(
     Set<Integer> identifierFieldIds = table.schema().identifierFieldIds();
 
     // override the identifier fields if the config is set
-    List<String> idCols = 
config.tableConfig(tableReference.identifier().name()).idColumns();
+    List<String> idCols = 
config.tableConfig(tableReference.identifier().toString()).idColumns();

Review Comment:
   Taking `String tableName` in `tableConfig` method can easily lead to such 
mistakes. As a follow-up, we could consider changing the parameter to 
`TableIdentifier`. Just an idea, not a requested change. 
   
   ```java
     public TableSinkConfig tableConfig(TableIdentifier identifier) {
       return tableConfig(identifier.toString());
     }
   
     /**
      * @deprecated since 1.12.0, will be removed in 1.13.0; use {@link 
#tableConfig(TableIdentifier)} instead
      */
     @Deprecated
     public TableSinkConfig tableConfig(String tableName) {
   ...
   ```



-- 
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]

Reply via email to