neilconway opened a new pull request, #10861:
URL: https://github.com/apache/arrow-rs/pull/10861

   # Which issue does this PR close?
   
   - Closes #10860.
   
   # Rationale for this change
   
   `compare_greater_byte_array_decimals` sign-extends the shorter value when 
comparing two's-complement byte arrays of different lengths. When the longer 
value's extra leading bytes were all sign-extension bytes, the final comparison 
dropped exactly one byte from each side and then lexicographically compares the 
remaining byte slices. This is incorrect when the byte slices are of different 
lengths.
   
   This can result in exact row-group/page stats with incorrect values (e.g., 
swapped min and max).
   
   Align the tails by skipping the length difference on the longer side only, 
matching parquet-mr.
   
   # What changes are included in this PR?
   
   * Fix bug in byte array comparison
   * Add tests
   
   # Are these changes tested?
   
   Yes; new tests added.
   
   # Are there any user-facing changes?
   
   No.
   
   # AI usage
   
   Bug found and fix written with Claude Code Fable 5; I reviewed and 
understand the resulting code.


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

Reply via email to