HuaHuaY opened a new pull request, #55946:
URL: https://github.com/apache/arrow/pull/55946

   ### Rationale for this change
   
   `SetBitRunReader` narrows the slice length to `int32_t` before computing how 
many bits to read from a partial byte. For an unaligned slice of 2^31 bits, 
this produces a negative bit count and triggers a Debug assertion.
   
   ### What changes are included in this PR?
   
   Compute the minimum in `int64_t` before narrowing the result in both the 
forward and reverse readers.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   No.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [ ] AI
   - [ ] Not reviewed
   
   * GitHub Issue: (filled in automatically from the PR title; change "Closes" 
to "Refs" for a partial fix)
   


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