MCPcopy Create free account
hub / github.com/apache/datafusion / find_columns

Method find_columns

datafusion/core/src/dataframe/mod.rs:2498–2509  ·  view source on GitHub ↗

Helper to find columns from names

(&self, names: &[String])

Source from the content-addressed store, hash-verified

2496
2497 // Helper to find columns from names
2498 fn find_columns(&self, names: &[String]) -> Result<Vec<FieldRef>> {
2499 let schema = self.logical_plan().schema();
2500 names
2501 .iter()
2502 .map(|name| {
2503 schema
2504 .field_with_name(None, name)
2505 .cloned()
2506 .map_err(|_| plan_datafusion_err!("Column '{}' not found", name))
2507 })
2508 .collect()
2509 }
2510
2511 /// Find qualified columns for this dataframe from names
2512 ///

Callers 1

fill_nullMethod · 0.80

Calls 7

collectMethod · 0.80
field_with_nameMethod · 0.80
schemaMethod · 0.45
logical_planMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
clonedMethod · 0.45

Tested by

no test coverage detected