You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/08/26 15:46:53 UTC
[PR] fix: Avoid incorrect min/max stats for BYTE_ARRAY decimals of unequal byte lengths [arrow-rs]
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Avoid incorrect min/max stats for BYTE_ARRAY decimals of unequal byte lengths [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #10861:
URL: https://github.com/apache/arrow-rs/pull/10861
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Avoid incorrect min/max stats for BYTE_ARRAY decimals of unequal byte lengths [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #10861:
URL: https://github.com/apache/arrow-rs/pull/10861#issuecomment-5443218755
FYI @etseidl
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org