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

Method add_column_refs

datafusion/expr/src/expr.rs:2070–2078  ·  view source on GitHub ↗

Adds references to all columns in this expression to the set See [`Self::column_refs`] for details

(&'a self, set: &mut HashSet<&'a Column>)

Source from the content-addressed store, hash-verified

2068 ///
2069 /// See [`Self::column_refs`] for details
2070 pub fn add_column_refs<'a>(&'a self, set: &mut HashSet<&'a Column>) {
2071 self.apply(|expr| {
2072 if let Expr::Column(col) = expr {
2073 set.insert(col);
2074 }
2075 Ok(TreeNodeRecursion::Continue)
2076 })
2077 .expect("traversal is infallible");
2078 }
2079
2080 /// Return all references to columns and their occurrence counts in the expression.
2081 ///

Callers 1

column_refsMethod · 0.80

Calls 2

applyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected