fbocse commented on a change in pull request #100: Fix handling of null 
partition values
URL: https://github.com/apache/incubator-iceberg/pull/100#discussion_r259527648
 
 

 ##########
 File path: spark/src/main/java/com/netflix/iceberg/spark/source/Reader.java
 ##########
 @@ -463,7 +463,12 @@ private static UnsafeProjection projection(Schema 
finalSchema, Schema readSchema
     @Override
     public InternalRow apply(StructLike tuple) {
       for (int i = 0; i < types.length; i += 1) {
-        reusedRow.update(i, convert(tuple.get(positions[i], javaTypes[i]), 
types[i]));
+        Object value = tuple.get(positions[i], javaTypes[i]);
+        if (value != null) {
+          reusedRow.update(i, convert(value, types[i]));
+        } else {
+          reusedRow.setNullAt(i);
 
 Review comment:
   👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to