szehon-ho commented on code in PR #8336:
URL: https://github.com/apache/iceberg/pull/8336#discussion_r1297706721


##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -460,7 +463,15 @@ public ByteBuffer keyMetadata() {
 
   @Override
   public List<Long> splitOffsets() {
-    return ArrayUtil.toLongList(splitOffsets);
+    if (splitOffsetsAsList == null && splitOffsets != null) {

Review Comment:
   Is second null check required ?  Looks like the internal method handles 
null, and original code did not have it.



##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -460,7 +463,15 @@ public ByteBuffer keyMetadata() {
 
   @Override
   public List<Long> splitOffsets() {
-    return ArrayUtil.toLongList(splitOffsets);
+    if (splitOffsetsAsList == null && splitOffsets != null) {
+      synchronized (this) {

Review Comment:
   No strong opinion, if we drop, should we add a comment on the method?



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