Returns the [`UnionFields`] for the union.
(&self)
| 313 | |
| 314 | /// Returns the [`UnionFields`] for the union. |
| 315 | pub fn fields(&self) -> &UnionFields { |
| 316 | match self.data_type() { |
| 317 | DataType::Union(fields, _) => fields, |
| 318 | _ => unreachable!("Union array's data type is not a union!"), |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | /// Returns whether the `UnionArray` is dense (or sparse if `false`). |
| 323 | pub fn is_dense(&self) -> bool { |