diff --git a/src/planner/mod.rs b/src/planner/mod.rs index c883bea..829dce4 100644 --- a/src/planner/mod.rs +++ b/src/planner/mod.rs @@ -31,10 +31,11 @@ pub struct DefaultQueryPlanner; impl DefaultQueryPlanner { fn physical_plan_projection(&self, projection: &Projection) -> Result> { let physical_plan = self.create_physical_plan(&projection.input)?; + let schema = physical_plan.schema(); let exprs = projection .exprs .iter() - .map(|e| self.create_physical_expr(&projection.schema, e)) + .map(|e| self.create_physical_expr(&schema, e)) .collect::>>()?; Ok(Arc::new(physical::plan::Projection::new( projection.schema.clone(),