findepi commented on code in PR #6721:
URL: https://github.com/apache/arrow-rs/pull/6721#discussion_r1845248260


##########
arrow-array/src/array/mod.rs:
##########
@@ -315,8 +315,7 @@ pub trait Array: std::fmt::Debug + Send + Sync {
     /// even if the nulls present in [`DictionaryArray::values`] are not 
referenced by any key,
     /// and therefore would not appear in [`Array::logical_nulls`].
     fn is_nullable(&self) -> bool {
-        // TODO this is not necessarily perfect default implementation, since 
null_count() and logical_null_count() are not always equivalent
-        self.null_count() != 0
+        self.logical_null_count() != 0

Review Comment:
   i added explicit implementation of `DictionaryArray::logical_null_count`
   i am not sure what to do about UnionArray. `UnionArray::logical_nulls` has 
non trivial logic. Can you please advise how this should be approached the best 
way? should I just copy that function?
   
   cc @alamb 



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