Returns whether the `UnionArray` is dense (or sparse if `false`).
(&self)
| 321 | |
| 322 | /// Returns whether the `UnionArray` is dense (or sparse if `false`). |
| 323 | pub fn is_dense(&self) -> bool { |
| 324 | match self.data_type() { |
| 325 | DataType::Union(_, mode) => mode == &UnionMode::Dense, |
| 326 | _ => unreachable!("Union array's data type is not a union!"), |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | /// Returns a zero-copy slice of this array with the indicated offset and length. |
| 331 | pub fn slice(&self, offset: usize, length: usize) -> Self { |
no test coverage detected