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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax.
   -->
   
   - Spawn off from #9653 
   - Contributes to #9731
   
   # Rationale for this change
   
   See #9731
   
   # What changes are included in this PR?
   
   Add `put_with_observer()` to `LevelEncoder` that calls an `FnMut(i16, 
usize)` observer for each value during encoding. This allows callers to 
piggyback counting and histogram updates into the encoding pass without extra 
iterations over the level buffer.
   
   Previously, `write_mini_batch()` made 3 separate passes over each level 
array: one to count non-null values or row boundaries, one to update the level 
histogram, and one to RLE-encode. Now all three operations happen in a single 
pass via the observer closure.
   
   Replace `LevelHistogram::update_from_levels()` with a new 
`LevelHistogram::increment_by()` that accepts a count, and remove the 
now-unnecessary `update_definition_level_histogram()` and 
`update_repetition_level_histogram()` methods from PageMetrics.
   
   # Are these changes tested?
   
   All tests passing; existing tests give 100% coverage.
   
   # Are there any user-facing changes?
   
   None
   


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