diff --git a/datafusion/expr/src/logical_plan/builder.rs b/datafusion/expr/src/logical_plan/builder.rs index 98e262f0b187..d081e917673b 100644 --- a/datafusion/expr/src/logical_plan/builder.rs +++ b/datafusion/expr/src/logical_plan/builder.rs @@ -38,9 +38,8 @@ use crate::logical_plan::{ }; use crate::type_coercion::binary::{comparison_coercion, values_coercion}; use crate::utils::{ - can_hash, columnize_expr, compare_sort_expr, expand_qualified_wildcard, - expand_wildcard, expr_to_columns, find_valid_equijoin_key_pair, - group_window_expr_by_sort_keys, + can_hash, columnize_expr, compare_sort_expr, expand_wildcard, expr_to_columns, + find_valid_equijoin_key_pair, group_window_expr_by_sort_keys, }; use crate::{ and, binary_expr, logical_plan::tree_node::unwrap_arc, DmlStatement, Expr, @@ -1440,22 +1439,11 @@ pub fn project( plan: LogicalPlan, expr: impl IntoIterator>, ) -> Result { - // TODO: move it into analyzer - let input_schema = plan.schema(); let mut projected_expr = vec![]; for e in expr { let e = e.into(); match e { - Expr::Wildcard { qualifier: None } => { - projected_expr.extend(expand_wildcard(input_schema, &plan, None)?) - } - Expr::Wildcard { - qualifier: Some(qualifier), - } => projected_expr.extend(expand_qualified_wildcard( - &qualifier, - input_schema, - None, - )?), + Expr::Wildcard { .. } => projected_expr.push(e), _ => projected_expr.push(columnize_expr(normalize_col(e, &plan)?, &plan)?), } }