jayzhan211 commented on code in PR #15230: URL: https://github.com/apache/datafusion/pull/15230#discussion_r1996497940
########## datafusion/sql/src/select.rs: ########## @@ -741,8 +722,17 @@ impl<S: ContextProvider> SqlToRel<'_, S> { } /// Wrap a plan in a projection - fn project(&self, input: LogicalPlan, expr: Vec<Expr>) -> Result<LogicalPlan> { - self.validate_schema_satisfies_exprs(input.schema(), &expr)?; + fn project(&self, input: LogicalPlan, expr: Vec<SelectExpr>) -> Result<LogicalPlan> { + // convert to Expr for validate_schema_satisfies_exprs + let exprs = expr + .iter() + .filter_map(|e| match e { + SelectExpr::Expression(expr) => Some(expr.to_owned()), + _ => None, + }) + .collect::<Vec<_>>(); + self.validate_schema_satisfies_exprs(input.schema(), &exprs)?; Review Comment: it doesn't check wildcard case so we don't need to change params to SelectExpr -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org