Returns all the out reference(correlated) expressions (recursively) in the current logical plan nodes and all its descendant nodes.
(self: &LogicalPlan)
| 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 | /// |
no test coverage detected