Accesses the child array for `type_id`. # Panics Panics if the `type_id` provided is not present in the array's DataType in the `Union`.
(&self, type_id: i8)
| 248 | /// Panics if the `type_id` provided is not present in the array's DataType |
| 249 | /// in the `Union`. |
| 250 | pub fn child(&self, type_id: i8) -> &ArrayRef { |
| 251 | assert!((type_id as usize) < self.fields.len()); |
| 252 | let boxed = &self.fields[type_id as usize]; |
| 253 | boxed.as_ref().expect("invalid type id") |
| 254 | } |
| 255 | |
| 256 | /// Returns the `type_id` for the array slot at `index`. |
| 257 | /// |