MCPcopy Create free account
hub / github.com/apache/arrow-rs / column_names

Method column_names

arrow-array/src/array/struct_array.rs:300–308  ·  view source on GitHub ↗

Return field names in this struct array

(&self)

Source from the content-addressed store, hash-verified

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 {

Callers 3

newMethod · 0.80
column_by_nameMethod · 0.80
fmtMethod · 0.80

Calls 4

data_typeMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected