wombatu-kun commented on code in PR #16654:
URL: https://github.com/apache/iceberg/pull/16654#discussion_r3740588847


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java:
##########
@@ -95,11 +95,19 @@ class RecordConverter {
   private final NameMapping nameMapping;
   private final IcebergSinkConfig config;
   private final Map<Integer, Map<String, NestedField>> structNameMap = 
Maps.newHashMap();
+  // Parquet stores UUIDs as a 16-byte fixed; other formats keep the UUID 
logical type. The write
+  // file format is fixed for the converter's lifetime, so resolve this once 
instead of per value.
+  private final boolean writeUuidAsBytes;
 
   RecordConverter(Table table, IcebergSinkConfig config) {
     this.tableSchema = table.schema();
     this.nameMapping = createNameMapping(table);
     this.config = config;
+    this.writeUuidAsBytes =

Review Comment:
   No test was at risk here. `IcebergWriter.initNewWriter()` calls 
`RecordUtils.createTableWriter` before `new RecordConverter(...)`, and that 
already does `tableProps.putAll(config.writeProps())`. `TestSinkWriter` builds 
a real `SinkWriter` over a bare mock that never stubs `writeProps()` and passes 
on main, because Mockito returns an empty map rather than null for 
`Map`-returning methods.



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