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

Method column_refs

datafusion/expr/src/expr.rs:2061–2065  ·  view source on GitHub ↗

Return all references to columns in this expression. # Example ``` # use std::collections::HashSet; # use datafusion_common::Column; # use datafusion_expr::col; // For an expression `a + (b * a)` let expr = col("a") + (col("b") * col("a")); let refs = expr.column_refs(); // refs contains "a" and "b" assert_eq!(refs.len(), 2); assert!(refs.contains(&Column::new_unqualified("a"))); assert!(refs.con

(&self)

Source from the content-addressed store, hash-verified

2059 /// assert!(refs.contains(&Column::new_unqualified("b")));
2060 /// ```
2061 pub fn column_refs(&self) -> HashSet<&Column> {
2062 let mut using_columns = HashSet::new();
2063 self.add_column_refs(&mut using_columns);
2064 using_columns
2065 }
2066
2067 /// Adds references to all columns in this expression to the set
2068 ///

Callers 15

collect_subquery_colsFunction · 0.80
test_collect_exprFunction · 0.80
sort_with_limitMethod · 0.80
build_order_byMethod · 0.80
createMethod · 0.80
has_all_column_refsFunction · 0.80
add_extractedMethod · 0.80

Calls 2

newFunction · 0.85
add_column_refsMethod · 0.80

Tested by 1

test_collect_exprFunction · 0.64