singhpk234 commented on code in PR #8860: URL: https://github.com/apache/iceberg/pull/8860#discussion_r1362614788
########## core/src/main/java/org/apache/iceberg/BaseFile.java: ########## @@ -460,6 +460,16 @@ public ByteBuffer keyMetadata() { @Override public List<Long> splitOffsets() { + if (splitOffsets == null || splitOffsets.length == 0) { + return null; + } + + // If the last split offset is past the file size this means the split offsets are corrupted and Review Comment: looks like Split Offsets being ordered in ascending order is not being enforced during reads either, we just swallow, we should be fine in this case as well then :P ``` if (splitOffsets != null && ArrayUtil.isStrictlyAscending(splitOffsets)) { return () -> new OffsetsAwareSplitScanTaskIterator<>( self(), length(), splitOffsets, this::newSplitTask); } else { return () -> new FixedSizeSplitScanTaskIterator<>( self(), length(), targetSplitSize, this::newSplitTask); } } ``` -- 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