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

   Add counter-part of `Array::null_count`, but counting the logical null 
values. This will be useful in DataFusion. Current alternative is to compute 
null mask (via `Array::logical_nulls()`) and do counting on it. Given this 
might be expensive and verbose, caller may naturally feel steer towards 
`Array::null_count` which may or may not be applicable, depending on the 
context.
   
   - follows https://github.com/apache/arrow-rs/pull/4691
   
   # Which issue does this PR close?
   
   
   - relates to https://github.com/apache/arrow-rs/issues/5208
   
   # Rationale for this change
    
    https://github.com/apache/arrow-rs/pull/4691 changed semantics of 
`Array::null_count` for eg `NullArray`. DataFusion upgrade to Arrow version 
with this change introduced a subtle bug, being fixed in 
https://github.com/apache/datafusion/pull/13029. When working on a fix, it 
seemed that many usages of `Array::null_count` should be redirect to count 
logical nulls (not only the one being updated in that PR). Having a function to 
count logical nulls would be useful, as alternative is computationally more 
expensive (may involve creation or copying of a null mask).
   
   
   # What changes are included in this PR?
   
   New `Array::logical_null_count` function.
   
   
   # Are there any user-facing changes?
   
   No


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