askoa commented on PR #3553:
URL: https://github.com/apache/arrow-rs/pull/3553#issuecomment-1400742512

   There are multiple suggestion on `array.len()` and `array.null_count()`. I 
thought it's good to consolidate into one discussion. Let's discuss using 
example below
   
   ```
   logical array = [Some(5), None, None]
   logical array len = 3
   logical array null count = 2
   
   physical array 
       run_ends = [1,3]
       values = [Some[5], None]
   physical array len = 2
   physical array null count = 1
   ```
   
   I think 
   1. `array.len()` should return 2. 
   2. `array.null_count()` should return 1. 
   
   My reasoning being we should not mix the logical array and physical array 
characteristics. The `array` should return the underlying physical array 
properties.
   
   Base on the comments in the PR
   1. `array.len()` should return 3
   2. `array.null_count()` should return 0.
   
   What are your opinion on this?
   
   cc: @tustvold @viirya @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