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

Method all_out_ref_exprs

datafusion/expr/src/logical_plan/plan.rs:426–447  ·  view source on GitHub ↗

Returns all the out reference(correlated) expressions (recursively) in the current logical plan nodes and all its descendant nodes.

(self: &LogicalPlan)

Source from the content-addressed store, hash-verified

424 /// Returns all the out reference(correlated) expressions (recursively) in the current
425 /// logical plan nodes and all its descendant nodes.
426 pub fn all_out_ref_exprs(self: &LogicalPlan) -> Vec<Expr> {
427 let mut exprs = vec![];
428 self.apply_expressions(|e| {
429 find_out_reference_exprs(e).into_iter().for_each(|e| {
430 if !exprs.contains(&e) {
431 exprs.push(e)
432 }
433 });
434 Ok(TreeNodeRecursion::Continue)
435 })
436 // closure always returns OK
437 .unwrap();
438 self.inputs()
439 .into_iter()
440 .flat_map(|child| child.all_out_ref_exprs())
441 .for_each(|e| {
442 if !exprs.contains(&e) {
443 exprs.push(e)
444 }
445 });
446 exprs
447 }
448
449 /// Returns all inputs / children of this `LogicalPlan` node.
450 ///

Callers 13

existsFunction · 0.80
not_existsFunction · 0.80
in_subqueryFunction · 0.80
not_in_subqueryFunction · 0.80
scalar_subqueryFunction · 0.80
parse_exists_subqueryMethod · 0.80
parse_in_subqueryMethod · 0.80
parse_scalar_subqueryMethod · 0.80
from_subqueryFunction · 0.80
exists_subqueryFunction · 0.80

Calls 6

find_out_reference_exprsFunction · 0.85
apply_expressionsMethod · 0.80
into_iterMethod · 0.45
containsMethod · 0.45
pushMethod · 0.45
inputsMethod · 0.45

Tested by

no test coverage detected