rdblue commented on a change in pull request #2683:
URL: https://github.com/apache/iceberg/pull/2683#discussion_r654571257



##########
File path: data/src/main/java/org/apache/iceberg/data/InternalRecordWrapper.java
##########
@@ -81,7 +81,13 @@ public int size() {
   @Override
   public <T> T get(int pos, Class<T> javaClass) {
     if (transforms[pos] != null) {
-      return javaClass.cast(transforms[pos].apply(wrapped.get(pos, 
Object.class)));
+      Object value = wrapped.get(pos, Object.class);
+      if (value == null) {
+        // transforms function don't allow to handle null values, so just 
return null here.

Review comment:
       Thanks for adding a comment to clarify why you're making this change!




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

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