From 7600035cc1b3e7c4505568de541024ada9f3b1be Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 9 May 2024 08:35:12 -0400 Subject: [PATCH] Minor: Clarify usecase for `LogicalPlan::recompute_schema` --- 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 7dca12f79369..9832b69f841a 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. ///