Skip to content

Apache DataFusion SQL Query Engine

minor: remove redundant code (#2432)

jakevinc33ffe040435
diff --git a/datafusion/core/src/physical_plan/planner.rs b/datafusion/core/src/physical_plan/planner.rs
index e3b9bc4341..b58029eb59 100644
--- a/datafusion/core/src/physical_plan/planner.rs
+++ b/datafusion/core/src/physical_plan/planner.rs
@@ -798,11 +798,9 @@ impl DefaultPhysicalPlanner {
*produce_one_row,
SchemaRef::new(schema.as_ref().to_owned().into()),
))),
- LogicalPlan::SubqueryAlias(SubqueryAlias { input, alias, .. }) => {
+ LogicalPlan::SubqueryAlias(SubqueryAlias { input,.. }) => {
match input.as_ref() {
- LogicalPlan::TableScan(scan) => {
- let mut scan = scan.clone();
- scan.table_name = alias.clone();
+ LogicalPlan::TableScan(..) => {
self.create_initial_plan(input, session_state).await
}
_ => Err(DataFusionError::Plan("SubqueryAlias should only wrap TableScan".to_string()))