From 24781fb7b3966f787cf72c97f42e2613f24fb2ac Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Sat, 1 Jun 2024 14:05:24 -0700 Subject: [PATCH] fix: Incorrect input schema when preparing result expressions for HashAggregation (#501) --- core/src/execution/datafusion/planner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index 7a37e3aae..a0b75de3f 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -779,7 +779,7 @@ impl PhysicalPlanner { .iter() .enumerate() .map(|(idx, expr)| { - self.create_expr(expr, child.schema()) + self.create_expr(expr, aggregate.schema()) .map(|r| (r, format!("col_{}", idx))) }) .collect();