rdblue commented on code in PR #12238:
URL: https://github.com/apache/iceberg/pull/12238#discussion_r1955051131


##########
core/src/main/java/org/apache/iceberg/avro/AvroSchemaUtil.java:
##########
@@ -219,6 +219,13 @@ public static boolean isKeyValueSchema(Schema schema) {
     return schema.getType() == RECORD && schema.getFields().size() == 2;
   }
 
+  public static boolean isVariantSchema(Schema schema) {
+    return schema.getType() == RECORD
+        && schema.getFields().size() == 2
+        && schema.getField("metadata") != null
+        && schema.getField("value") != null;

Review Comment:
   If this is checking the metadata/value fields, should this also verify that 
they are binary?



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

Reply via email to