yusufyildiz34 commented on code in PR #18508:
URL: https://github.com/apache/iceberg/pull/18508#discussion_r4308365254


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/RowDataWrapper.java:
##########
@@ -155,8 +166,114 @@ private static PositionalGetter<?> 
buildGetter(LogicalType logicalType, Type typ
         RowDataWrapper nestedWrapper = new RowDataWrapper(rowType, structType);
         return (row, pos) -> nestedWrapper.wrap(row.getRow(pos, 
rowType.getFieldCount()));
 
+      case ARRAY:
+        Function<Object, Object> listConverter = buildConverter(logicalType, 
type);
+        return (row, pos) -> listConverter.apply(row.getArray(pos));
+
+      case MAP:
+        Function<Object, Object> mapConverter = buildConverter(logicalType, 
type);
+        return (row, pos) -> mapConverter.apply(row.getMap(pos));
+
       default:
         return null;
     }
   }
+
+  private static Function<Object, Object> buildConverter(LogicalType 
logicalType, Type type) {

Review Comment:
   @mbutrovich following pvary's suggestion, top-level structs reuse one 
wrapper again and only collection elements get new wrappers, so the extra 
allocation is gone.



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