huaxingao commented on code in PR #14588:
URL: https://github.com/apache/iceberg/pull/14588#discussion_r2535690740
##########
parquet/src/main/java/org/apache/iceberg/parquet/RemoveIds.java:
##########
@@ -77,6 +77,16 @@ public Type primitive(PrimitiveType primitive) {
.named(primitive.getName());
}
+ @Override
+ public Type variant(GroupType variant) {
+ Types.GroupBuilder<GroupType> builder =
+
Types.buildGroup(variant.getRepetition()).as(variant.getLogicalTypeAnnotation());
+ for (Type field : variant.getFields()) {
+ builder.addField(field);
Review Comment:
If a VARIANT has a typed_value with IDs, do we need to visit children and
remove the IDs on the children too?
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquetSchemaUtil.java:
##########
@@ -464,4 +537,20 @@ private Type map(Integer id, String name, Repetition
repetition, Type keyType, T
}
return builder.named(name);
}
+
+ private Type variant(Integer id, String name, Repetition repetition) {
+ GroupBuilder<GroupType> builder =
+ org.apache.parquet.schema.Types.buildGroup(repetition)
+ .as(
+ org.apache.parquet.schema.LogicalTypeAnnotation.variantType(
Review Comment:
nit: import `org.apache.parquet.schema.LogicalTypeAnnotation` so we don't
need the fully qualified name here.
--
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]