rdblue commented on code in PR #12847:
URL: https://github.com/apache/iceberg/pull/12847#discussion_r2067405773


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantUtil.java:
##########
@@ -395,7 +399,30 @@ public Type object(VariantObject object, List<String> 
names, List<Type> typedVal
 
     @Override
     public Type array(VariantArray array, List<Type> elementResults) {
-      return null;
+      if (elementResults.isEmpty()) {
+        return null;
+      }
+
+      // Choose most common type as shredding type and build 3-level list
+      Type defaultTYpe = elementResults.get(0);
+      Type shredType =
+          elementResults.stream()

Review Comment:
   This is okay, but it seems strange to me to rely on `equals` and `hashCode` 
for types and counting. It would be simpler to only shred values if there is a 
uniform type, which is when we would benefit from shredding.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to