bryanck commented on code in PR #8834:
URL: https://github.com/apache/iceberg/pull/8834#discussion_r1359632733


##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -463,11 +463,7 @@ public ByteBuffer keyMetadata() {
 
   @Override
   public List<Long> splitOffsets() {
-    if (splitOffsetList == null && splitOffsets != null) {
-      this.splitOffsetList = ArrayUtil.toUnmodifiableLongList(splitOffsets);
-    }
-
-    return splitOffsetList;
+    return splitOffsets == null ? ImmutableList.of() : 
Longs.asList(splitOffsets);

Review Comment:
   The intent of the original PR was to avoid the inefficient copy of long 
primitives into a collection. The Guava wrapper should be much more efficient 
than the allocation being done previously.



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