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

   # Which issue does this PR close?
   
   Closes https://github.com/apache/arrow-rs/issues/4835
   
   # Rationale for this change
   
   The fact that `NullArray::is_null()` returns false is both consistent with 
the technical definition of physical/logical nulls, but also deeply confusing 
to a casual user, as explained on https://github.com/apache/arrow-rs/issues/4835
   
   I don't think the implications of logical vs physical nullability are well 
understood by the arrow user community (and to be honest I am not sure they 
should in most cases).
   
   Thus helping them find the right API for what they want to do would be incel 
   
   # What changes are included in this PR?
   1. Update doc comments to explicitly mention the `NullArray` case (the one 
where I think it is the most deeply confusing, even though this does 
potentially apply to `DictionaryArray` and `RunArray`
   2. Add an `Array::is_logical_null` that returns the the logical nullability  
(mostly as a way to document the behavior and save downstream crates from 
having to handle `NullArray` specially)
   
   # Are there any user-facing changes?
   New function and improved documentation
   
   # Questions
   1. What are your opinions on `Array::is_logical_null` 
   2. Should I add an equivalent of `Array::is_logical_valid` to mirror 
`Array::is_valid` ?


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