nastra commented on code in PR #17393:
URL: https://github.com/apache/iceberg/pull/17393#discussion_r3681016142


##########
core/src/main/java/org/apache/iceberg/deletes/BitmapPositionDeleteIndex.java:
##########
@@ -150,7 +150,8 @@ public static PositionDeleteIndex deserialize(byte[] bytes, 
DeleteFile deleteFil
     int crc = computeChecksum(bytes, bitmapDataLength);
     int crcOffset = LENGTH_SIZE_BYTES + bitmapDataLength;
     int expectedCrc = buffer.getInt(crcOffset);
-    Preconditions.checkArgument(crc == expectedCrc, "Invalid CRC");
+    Preconditions.checkArgument(
+        crc == expectedCrc, "Invalid CRC: %s, expected %s", crc, expectedCrc);

Review Comment:
   I guess the question is how actionable resulting error msg becomes. Maybe 
the error msg should also include the delete file location. Also what would a 
typical CRC tool spit out for a file? Would it be the same number or a hex 
string? In the latter case it might be worth to print the hex string 
representation of the two CRCs



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