pvary commented on code in PR #18610:
URL: https://github.com/apache/iceberg/pull/18610#discussion_r4349976740


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertReader.java:
##########
@@ -159,13 +160,17 @@ private void processDataFile(
         builder.project(readSchema).reuseContainers().build()) {
       Accessor<StructLike> posAccessor =
           readSchema.accessorForField(MetadataColumns.ROW_POSITION.fieldId());
+      // Generic records hold java.time values; the serializer expects 
Iceberg's internal
+      // representation (e.g. days for DATE, micros for TIMESTAMP).
+      InternalRecordWrapper keyWrapper = new 
InternalRecordWrapper(readSchema.asStruct());
       for (Record record : records) {
         long position = (long) posAccessor.get(record);
         if (existingDeletes != null && existingDeletes.isDeleted(position)) {
           continue;
         }
 
-        SerializedEqualityValues key = fieldSerializer.serializeKey(record, 
keySchema.asStruct());
+        SerializedEqualityValues key =
+            fieldSerializer.serializeKey(keyWrapper.wrap(record), 
keySchema.asStruct());

Review Comment:
   Can we update the javadoc of `StructLikeSerializer.serializeKey`, so future 
users know about this requirement?



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