mxm commented on code in PR #15265:
URL: https://github.com/apache/iceberg/pull/15265#discussion_r2786439875
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/data/ParquetWithFlinkSchemaVisitor.java:
##########
@@ -147,7 +149,20 @@ public static <T> T visit(
} finally {
visitor.fieldNames.pop();
}
+ } else if
(LogicalTypeAnnotation.variantType(Variant.VARIANT_SPEC_VERSION).equals(annotation)
+ || sType instanceof VariantType) {
+ // For the Variant we both check the Parquet LogicalTypeAnnotation,
and we rely on the
+ // Iceberg schema, since there are engines like Spark that produce
VariantTypes without the
+ // annotation.
+ Preconditions.checkArgument(
+ sType instanceof VariantType,
+ "Invalid variant: Spark type %s is not a variant type",
Review Comment:
This is a Flink type, not a Spark type?
--
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]