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


##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -38,6 +38,9 @@ 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);

Review Comment:
   I have the test coverage in TestBucketing.java TestIdentity.java to make 
`canTransform` doesn't accept variants.



##########
core/src/test/java/org/apache/iceberg/TestTableMetadata.java:
##########
@@ -1687,6 +1687,44 @@ public void testV3TimestampNanoTypeSupport() {
         3);
   }
 
+  @Test
+  public void testV3VariantTypeSupport() {

Review Comment:
   I removed the actual validation for both variant and timestamp_ns since it's 
already covered in TestSchema. I added version check/validation coverage for 
TableMetadata.newTableMetadata().



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

Reply via email to