Return field names in this struct array
(&self)
| 298 | |
| 299 | /// Return field names in this struct array |
| 300 | pub fn column_names(&self) -> Vec<&str> { |
| 301 | match self.data_type() { |
| 302 | DataType::Struct(fields) => fields |
| 303 | .iter() |
| 304 | .map(|f| f.name().as_str()) |
| 305 | .collect::<Vec<&str>>(), |
| 306 | _ => unreachable!("Struct array's data type is not struct!"), |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | /// Returns the [`Fields`] of this [`StructArray`] |
| 311 | pub fn fields(&self) -> &Fields { |