seokyun-ha-toss commented on code in PR #15283:
URL: https://github.com/apache/iceberg/pull/15283#discussion_r3116551220


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java:
##########
@@ -464,6 +479,222 @@ protected Temporal convertTimestampValue(Object value, 
TimestampType type) {
     return convertLocalDateTime(value);
   }
 
+  protected Variant convertVariantValue(Object value) {
+    if (value instanceof ByteBuffer) {
+      return Variant.from((ByteBuffer) value);
+    }
+
+    Set<String> fieldNames = Sets.newHashSet();
+    collectFieldNames(value, fieldNames);

Review Comment:
   I think this is mainly a design choice. Passing a `fieldNames` set from the 
top level and reusing it, versus constructing and merging sets from the bottom, 
are functionally equivalent.
   
   I’m not good at Java internals, but my intuition is that repeated set 
merging could be more expensive than simply adding elements into a single 
top-level set.
   
   That said, I’m open to changing the approach—would appreciate your thoughts.



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