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


##########
parquet/src/test/java/org/apache/iceberg/parquet/TestVariantReaders.java:
##########
@@ -900,6 +1176,31 @@ private static GenericRecord record(GroupType type, 
Map<String, Object> fields)
     return record;
   }
 
+  private static <T> List<GenericRecord> elements(Type shreddedType, List<T> 
elements) {

Review Comment:
   What about making this accept `VariantValue` instead of `T`? Then you could 
check for a particular `PhysicalType` to decide whether the value should be in 
`value` or `typed_value`:
   
   ```java
     for (VariantValue element: elements) {
       Map<String, Object> data = Map.of(element.type() != typeToShred ? 
"value" : "typed_value", element);
       elementRecords.add(record(elementSchema, data);
     }
   ```



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