From 5ee569797795ae83e19e844c2dfa64b45f32f090 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 15 Nov 2023 14:26:22 -0500 Subject: [PATCH] fix use of name in Column --- datafusion/optimizer/src/push_down_projection.rs | 2 +- datafusion/sqllogictest/test_files/periods.slt | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 datafusion/sqllogictest/test_files/periods.slt diff --git a/datafusion/optimizer/src/push_down_projection.rs b/datafusion/optimizer/src/push_down_projection.rs index 2c314bf7651c6..b05d811cb4819 100644 --- a/datafusion/optimizer/src/push_down_projection.rs +++ b/datafusion/optimizer/src/push_down_projection.rs @@ -228,7 +228,7 @@ impl OptimizerRule for PushDownProjection { // Gather all columns needed for expressions in this Aggregate let mut new_aggr_expr = vec![]; for e in agg.aggr_expr.iter() { - let column = Column::from(e.display_name()?); + let column = Column::from_name(e.display_name()?); if required_columns.contains(&column) { new_aggr_expr.push(e.clone()); } diff --git a/datafusion/sqllogictest/test_files/periods.slt b/datafusion/sqllogictest/test_files/periods.slt new file mode 100644 index 0000000000000..e69de29bb2d1d