Returns the total number of bytes of all non-null values in this array. Unlike [`Self::total_buffer_bytes_used`], this method includes inlined strings (those with length ≤ [`MAX_INLINE_VIEW_LEN`]), making it suitable as a capacity hint when pre-allocating output buffers. Null values are excluded from the sum. # Example ```rust # use arrow_array::StringViewArray; let array = StringViewArray::fr
(&self)
| 690 | /// assert_eq!(array.total_bytes_len(), 5 + 27); |
| 691 | /// ``` |
| 692 | pub fn total_bytes_len(&self) -> usize { |
| 693 | match self.nulls() { |
| 694 | None => self.views().iter().map(|v| (*v as u32) as usize).sum(), |
| 695 | Some(nulls) => self |
| 696 | .views() |
| 697 | .iter() |
| 698 | .zip(nulls.iter()) |
| 699 | .map(|(v, is_valid)| if is_valid { (*v as u32) as usize } else { 0 }) |
| 700 | .sum(), |
| 701 | } |
| 702 | } |
| 703 | |
| 704 | /// Returns the total number of bytes used by all non inlined views in all |
| 705 | /// buffers. |