Returns a zero-copy slice of this array with the indicated offset and length.
(&self, offset: usize, length: usize)
| 236 | |
| 237 | /// Returns a zero-copy slice of this array with the indicated offset and length. |
| 238 | pub fn slice(&self, offset: usize, length: usize) -> Self { |
| 239 | Self { |
| 240 | data_type: self.data_type.clone(), |
| 241 | nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)), |
| 242 | entries: self.entries.clone(), |
| 243 | value_offsets: self.value_offsets.slice(offset, length), |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | /// constructs a new iterator |
| 248 | pub fn iter(&self) -> MapArrayIter<'_> { |