Skip to content

Apache DataFusion SQL Query Engine

add getter method for LogicalPlanBuilder.plan (#12038)

Matt Green950dc73c7f76
diff --git a/datafusion/expr/src/logical_plan/builder.rs b/datafusion/expr/src/logical_plan/builder.rs
index f9769560b2..aa28c1c192 100644
--- a/datafusion/expr/src/logical_plan/builder.rs
+++ b/datafusion/expr/src/logical_plan/builder.rs
@@ -107,6 +107,11 @@ impl LogicalPlanBuilder {
self.plan.schema()
}
+ /// Return the LogicalPlan of the plan build so far
+ pub fn plan(&self) -> &LogicalPlan {
+ &self.plan
+ }
+
/// Create an empty relation.
///
/// `produce_one_row` set to true means this empty node needs to produce a placeholder row.