pitrou commented on code in PR #47992:
URL: https://github.com/apache/arrow/pull/47992#discussion_r2522324594
##########
cpp/src/arrow/util/rle_encoding_internal.h:
##########
@@ -671,20 +671,32 @@ auto RleBitPackedParser::PeekImpl(Handler&& handler) const
if (is_bit_packed) {
// Bit-packed run
constexpr auto kMaxCount =
bit_util::CeilDiv(internal::max_size_for_v<rle_size_t>, 8);
- if (ARROW_PREDICT_FALSE(count == 0 || count > kMaxCount)) {
+ if (ARROW_PREDICT_FALSE(count == 0 || count >= kMaxCount)) {
Review Comment:
Because `kMaxCount` uses `CeilDiv` and is therefore one large than the
actual max.
That said, this is a bit confusing so I could try to change to `kMaxCount =
internal::max_size_for_v<rle_size_t> / 8`.
--
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]