fallintoplace opened a new pull request, #3701: URL: https://github.com/apache/parquet-java/pull/3701
### Rationale for this change `ByteBufferBackedBinary.equals(ByteBuffer, int, int)` compares from index 0 instead of the binary’s stored offset. For direct buffers with a non-zero position, this can make equal values compare unequal and can also make different values compare equal when prefix bytes happen to match. ### What changes are included in this PR? Use the stored offset when comparing a `ByteBufferBackedBinary` with another `ByteBuffer`. Add regression coverage for equality symmetry, matching hash codes, and unequal values whose prefix bytes match. ### Are these changes tested? Yes. `TestBinary` passes with 16 tests, and the Spotless check passes. ### Are there any user-facing changes? Equality for direct `ByteBuffer`-backed binaries now uses the bytes represented by the binary slice. -- 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]
