HonahX commented on code in PR #12012:
URL: https://github.com/apache/iceberg/pull/12012#discussion_r1924520051


##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -93,6 +95,10 @@ public SerializableFunction<T, T> bind(Type type) {
 
   @Override
   public boolean canTransform(Type maybePrimitive) {
+    if (maybePrimitive.typeId() == Type.TypeID.UNKNOWN) {
+      return false;

Review Comment:
   Shall we update the spec to reflect this? Currently `Identity Transform` 
accepts "any" type: https://iceberg.apache.org/spec/#primitive-types



##########
api/src/test/java/org/apache/iceberg/transforms/TestBucketing.java:
##########
@@ -431,6 +431,20 @@ public void testVariantUnsupported() {
     assertThat(bucket.canTransform(Types.VariantType.get())).isFalse();
   }
 
+  @Test
+  public void testUnknownUnsupported() {

Review Comment:
   Do we need similar tests for other transforms test?



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