aihuaxu commented on code in PR #13219:
URL: https://github.com/apache/iceberg/pull/13219#discussion_r2238006454
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/ParquetWithSparkSchemaVisitor.java:
##########
@@ -152,6 +153,14 @@ public static <T> T visit(DataType sType, Type type,
ParquetWithSparkSchemaVisit
} finally {
visitor.fieldNames.pop();
}
+ } else if (sType instanceof VariantType) {
+ // TODO: Use LogicalTypeAnnotation.variantType().equals(annotation)
when VARIANT type is
+ // added to Parquet
+ // Preconditions.checkArgument(
+ // sType instanceof VariantType, "Invalid variant: %s is not a
VariantType", sType);
Review Comment:
@amogh-jahagirdar We can't remove this yet. We will wait for new
Parquet-java release and then switch to use VariantLogicalType. This is the
change we will need to add when we do that.
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/ParquetWithSparkSchemaVisitor.java:
##########
@@ -152,6 +153,14 @@ public static <T> T visit(DataType sType, Type type,
ParquetWithSparkSchemaVisit
} finally {
visitor.fieldNames.pop();
}
+ } else if (sType instanceof VariantType) {
+ // TODO: Use LogicalTypeAnnotation.variantType().equals(annotation)
when VARIANT type is
+ // added to Parquet
+ // Preconditions.checkArgument(
+ // sType instanceof VariantType, "Invalid variant: %s is not a
VariantType", sType);
Review Comment:
Thanks for reviewing.
--
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]