You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "Jiayi-Wang-db (via GitHub)" <gi...@apache.org> on 2026/03/16 14:19:23 UTC

[I] Fix BinaryStats int overflow [parquet-java]

Jiayi-Wang-db opened a new issue, #3449:
URL: https://github.com/apache/parquet-java/issues/3449

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   `BinaryStatistics.isSmallerThan()` computes `min.length() + max.length()` as `int + int`. When a binary column contains values >= 2^30 bytes (1 GB), this sum overflows to a negative number, which is then incorrectly evaluated as smaller than `MAX_STATS_SIZE` (4096). This causes the full multi-GB min/max statistics to be serialized into the Thrift footer instead of being dropped, resulting in a corrupted Parquet file whose footer exceeds the 4-byte length field and cannot be read back.
   
   ### Component(s)
   
   _No response_


-- 
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-unsubscribe@parquet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org