Return an iterator over the length of each array element, including null values. Null values length would equal to the underlying bytes length and NOT 0 Example of getting 0 for null values ```rust # use arrow_array::StringViewArray; # use arrow_array::Array; use arrow_data::ByteView; fn lengths_with_zero_for_nulls(view: &StringViewArray) -> impl Iterator { view.lengths() .enumerate
(&self)
| 455 | /// } |
| 456 | /// ``` |
| 457 | pub fn lengths(&self) -> impl ExactSizeIterator<Item = u32> + Clone { |
| 458 | self.views().iter().map(|v| *v as u32) |
| 459 | } |
| 460 | |
| 461 | /// Returns a zero-copy slice of this array with the indicated offset and length. |
| 462 | pub fn slice(&self, offset: usize, length: usize) -> Self { |