From dfa6063a6236aa656e3822716db6916fd0225e1a Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Sat, 11 May 2024 06:33:23 -0400 Subject: [PATCH] Minor: Clarify usecase for `LogicalPlan::recompute_schema` (#10443) --- datafusion/expr/src/logical_plan/plan.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rs index 7dca12f793699..9832b69f841a9 100644 --- a/datafusion/expr/src/logical_plan/plan.rs +++ b/datafusion/expr/src/logical_plan/plan.rs @@ -479,6 +479,11 @@ impl LogicalPlan { /// expressions. For example [`LogicalPlan::Filter`] schema is always the /// same as its input schema. /// + /// This is useful after modifying a plans `Expr`s (or input plans) via + /// methods such as [Self::map_children] and [Self::map_expressions]. Unlike + /// [Self::with_new_exprs], this method does not require a new set of + /// expressions or inputs plans. + /// /// # Return value /// Returns an error if there is some issue recomputing the schema. ///