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


##########
api/src/main/java/org/apache/iceberg/expressions/VariantExpressionUtil.java:
##########
@@ -111,8 +113,19 @@ static <T> T castTo(VariantValue value, Type type) {
         }
 
         break;
-    }
+      case TIMESTAMP:
+      case TIMESTAMP_NANO:
+      case TIME:
+        if (value.type() == PhysicalType.INT64) {
+          return (T) (Long) ((Number) value.asPrimitive().get()).longValue();
+        }
 
+        break;
+      case UUID:

Review Comment:
   UUIDs should not be converted to any other type. The semantics of `extract` 
are very strict. If the type doesn't match then the result is that there is no 
bound. This is to ensure that type conversions are controlled by engines. 
Iceberg needs to be compatible with whatever casts or type conversions logic is 
correct at the engine level.



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