Returns all expressions (non-recursively) evaluated by the current logical plan node. This does not include expressions in any children. Note this method `clone`s all the expressions. When possible, the [`tree_node`] API should be used instead of this API. The returned expressions do not necessarily represent or even contributed to the output schema of this node. For example, `LogicalPlan::Filte
(self: &LogicalPlan)
| 411 | /// |
| 412 | /// [`tree_node`]: crate::logical_plan::tree_node |
| 413 | pub fn expressions(self: &LogicalPlan) -> Vec<Expr> { |
| 414 | let mut exprs = vec![]; |
| 415 | self.apply_expressions(|e| { |
| 416 | exprs.push(e.clone()); |
| 417 | Ok(TreeNodeRecursion::Continue) |
| 418 | }) |
| 419 | // closure always returns OK |
| 420 | .unwrap(); |
| 421 | exprs |
| 422 | } |
| 423 | |
| 424 | /// Returns all the out reference(correlated) expressions (recursively) in the current |
| 425 | /// logical plan nodes and all its descendant nodes. |