findepi commented on PR #6608:
URL: https://github.com/apache/arrow-rs/pull/6608#issuecomment-2428383495

   > needing the logical null count recently (for array statistics)
   
   @westonpace good point! this was exactly the case in 
https://github.com/apache/datafusion/pull/13029 too
   
   but that's not the only place -- DataFusion aggregation accumulators often 
call `null_count()` and this works **only because** for quite a few array types 
`null_count()` happens to be "logical null count". But contract-wise, this is a 
wrong function to call, and doesn't generalize to non-primitive types.
   
   > If this is what you need, which it very often isn't, then you have to call 
`logical_nulls()` and get the null count from it. The friction is a feature, 
not a bug 😅
   
   @tustvold  I don't mind writing more code (friction), but is this efficient 
at runtime?
   


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