singhpk234 commented on code in PR #8860:
URL: https://github.com/apache/iceberg/pull/8860#discussion_r1362607781


##########
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:
   Agree with you ! 
   
   I was mostly coming from the point of view of a buggy writer (that didn't 
use core-lib as we expose split offsets via ParquetMetadata or purpose fully 
passed wrong offsets) which has already committed this metadata. Such writers 
will never be caught because we will be silently skipping the malformed 
offsets, was wondering if having a warning log then, during reads so that we 
could let the readers know of the corruptions and reads would be a bit 
un-optimized, so that it could help in backtracking the buggy writer,  thoughts 
? 
   



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