rdblue commented on code in PR #11831: URL: https://github.com/apache/iceberg/pull/11831#discussion_r1942090932
########## core/src/main/java/org/apache/iceberg/SchemaParser.java: ########## @@ -145,6 +145,8 @@ static void toJson(Type.PrimitiveType primitive, JsonGenerator generator) throws static void toJson(Type type, JsonGenerator generator) throws IOException { if (type.isPrimitiveType()) { toJson(type.asPrimitiveType(), generator); + } else if (type.isVariantType()) { + generator.writeString(type.toString()); Review Comment: I'd probably just inline the `toJson` call from the previous case along with this: ```java if (type.isPrimitiveType() || type.isVariantType()) { generator.writeString(type.toString()); } else { ``` -- 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