alamb commented on code in PR #4682: URL: https://github.com/apache/arrow-datafusion/pull/4682#discussion_r1053652443
########## datafusion/optimizer/src/utils.rs: ########## @@ -583,6 +583,7 @@ where fn name_for_alias(expr: &Expr) -> Result<String> { match expr { Expr::Sort { expr, .. } => name_for_alias(expr), + Expr::Wildcard => Ok("*".to_string()), expr => expr.display_name(), Review Comment: As you note in your PR description, another way to fix this would be to support `Expr::Wildcard` in `Expr::display_name` Unless there is some reason to not support `WildCard`s in `Expr::display_name` I would personally prefer adding the support there. It seems strange to put code for Wildcard in a function that seem to be trying to unwrap `Expr::Sort`s 🤔 https://github.com/apache/arrow-datafusion/blob/fddb3d3651041f41d66a801f10e27387e84374f7/datafusion/expr/src/expr.rs#L1358-L1360 -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org