Returns a zero-copy slice of this array with the indicated offset and length.
(&self, offset: usize, length: usize)
| 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 { |
| 463 | Self { |
| 464 | data_type: T::DATA_TYPE, |
| 465 | views: self.views.slice(offset, length), |
| 466 | buffers: self.buffers.clone(), |
| 467 | nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)), |
| 468 | phantom: Default::default(), |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | /// Returns a "compacted" version of this array |
| 473 | /// |