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: [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]