rdblue commented on code in PR #11831: URL: https://github.com/apache/iceberg/pull/11831#discussion_r1958660466
########## api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java: ########## @@ -250,6 +250,19 @@ public List<String> map( } } + @Override + public List<String> variant(Types.VariantType readVariant) { + if (currentType.isVariantType()) { + return NO_ERRORS; + } + + // Currently promotion is not allowed to variant type + return ImmutableList.of( + String.format( + ": %s cannot be read as a %s", + currentType.typeId().toString().toLowerCase(Locale.ENGLISH), readVariant)); Review Comment: Nit: `currentType` should work instead of this conversion. I know this was copied from primitive, but it isn't needed. -- 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