Copilot commented on code in PR #55946:
URL: https://github.com/apache/arrow/pull/55946#discussion_r4781637827
##########
cpp/src/arrow/util/bit_run_reader.h:
##########
@@ -229,7 +229,7 @@ class BaseSetBitRunReader {
if (length > 0 && bit_offset) {
// Get MSBs from first byte
current_num_bits_ =
- std::min(static_cast<int32_t>(length), static_cast<int32_t>(8 -
bit_offset));
+ static_cast<int32_t>(std::min<int64_t>(length, 8 - bit_offset));
Review Comment:
Please add the large-unaligned-slice regression test for both reader
directions to bitmap_test.cc. Existing TestSetBitRunReader cases use at most
4096 bits, so they pass with the original narrowing bug. The issue's 2^31-bit,
offset-3 example checks the failing boundary without scanning the entire bitmap.
--
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]