From 03a4cdd740493981fd6635405c10c61a45b9dbd5 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 4 Jul 2024 15:07:20 +0800 Subject: [PATCH] fix: wrong projection --- src/planner/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(),