stevenzwu commented on code in PR #5109:
URL: https://github.com/apache/iceberg/pull/5109#discussion_r903015098


##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetReaders.java:
##########
@@ -482,8 +484,10 @@ protected void addElement(ReusableArrayData reused, E 
element) {
 
     @Override
     protected ArrayData buildList(ReusableArrayData list) {
-      list.setNumElements(writePos);
-      return list;
+      // Since ReusableArrayData is not accepted by Flink, use 
GenericArrayData temporarily to walk around it.

Review Comment:
   We may need to update/fix the `ArrayDataSerializer#copy` method from Flink 
first.
   
   ```
       @Override
       public ArrayData copy(ArrayData from) {
           if (from instanceof GenericArrayData) {
               return copyGenericArray((GenericArrayData) from);
           } else if (from instanceof ColumnarArrayData) {
               return copyColumnarArray((ColumnarArrayData) from);
           } else if (from instanceof BinaryArrayData) {
               return ((BinaryArrayData) from).copy();
           } else {
               return toBinaryArray(from);
           }
       }
   ```



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