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


##########
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:
   Also would be great to add a small test that exercises this path and asserts 
on the resulting error msg



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