RussellSpitzer commented on code in PR #15634:
URL: https://github.com/apache/iceberg/pull/15634#discussion_r3113367268


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetValueReaders.java:
##########
@@ -847,7 +849,8 @@ protected List<E> newListData(List<E> reuse) {
       }
 
       if (reuse != null) {
-        this.lastList = reuse;
+        // reuse containers may come from a different reader (e.g. Avro) with 
incompatible types
+        this.lastList = reuse instanceof ArrayList ? reuse : null;

Review Comment:
   Ok turns out this is really trick to make a "dissallow" list since the JDK 
immutables are package private so we can't actually do instanceOf Checks to 
determine if a list is immutable. We could do "forName" checks" but that's kind 
of gross
   



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