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



##########
File path: core/src/main/java/org/apache/iceberg/DataFiles.java
##########
@@ -176,7 +176,7 @@ public Builder copy(DataFile toCopy) {
       this.keyMetadata = toCopy.keyMetadata() == null ? null
           : ByteBuffers.copy(toCopy.keyMetadata());
       this.splitOffsets = toCopy.splitOffsets() == null ? null : 
copyList(toCopy.splitOffsets());
-      this.sortOrderId = toCopy.sortOrderId();
+      this.sortOrderId = toCopy.sortOrderId() == null ? 
SortOrder.unsorted().orderId() : toCopy.sortOrderId();

Review comment:
       If the copied `DataFile` returns null, shouldn't the copy also return 
null? Why not make the builder use `Integer` instead of a primitive here?




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