aihuaxu commented on code in PR #11831:
URL: https://github.com/apache/iceberg/pull/11831#discussion_r1904474514


##########
core/src/test/java/org/apache/iceberg/TestMetadataUpdateParser.java:
##########
@@ -52,6 +56,15 @@ public class TestMetadataUpdateParser {
           Types.NestedField.required(1, "id", Types.IntegerType.get()),
           Types.NestedField.optional(2, "data", Types.StringType.get()));
 
+  private static final Schema ID_VARIANTDATA_SCHEMA =

Review Comment:
   Let me know if we need to add TestSchemaParser class. Not sure if we already 
cover the tests with  TestMetadataUpdateParser.java indirectly and 
intentionally not add TestSchemaParser.java. 



##########
core/src/main/java/org/apache/iceberg/SchemaParser.java:
##########
@@ -42,6 +42,7 @@ private SchemaParser() {}
   private static final String STRUCT = "struct";
   private static final String LIST = "list";
   private static final String MAP = "map";
+  private static final String VARIANT = "variant";

Review Comment:
   @rdblue  Can you help check if the new change works for you? 



##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -39,7 +42,7 @@ class Identity<T> implements Transform<T, T> {
   @Deprecated
   public static <I> Identity<I> get(Type type) {
     Preconditions.checkArgument(
-        type.typeId() != Type.TypeID.VARIANT, "Unsupported type for identity: 
%s", type);
+        !UNSUPPORTED_TYPES.contains(type), "Unsupported type for identity: 
%s", type);

Review Comment:
   I don't follow the following change suggestion. Let me revert this unrelated 
change and we can add it back if needed.   
   
   > I would normally structure it as the contains at first



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