goldmedal commented on code in PR #12046:
URL: https://github.com/apache/datafusion/pull/12046#discussion_r1723511991


##########
datafusion/sql/src/select.rs:
##########
@@ -749,11 +748,15 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             .map(|expr| rebase_expr(expr, &aggr_projection_exprs, input))
             .collect::<Result<Vec<Expr>>>()?;
 
+        let wildcard_exprs = select_exprs_post_aggr.iter().filter(|expr| 
matches!(expr, Expr::Wildcard { .. })).collect::<Vec<_>>();
+        let wildcard_fields = exprlist_to_fields(wildcard_exprs, input)?;

Review Comment:
   I found that there are too many cases to handle, making it difficult to 
manage them cleanly. This could complicate the codebase. Currently, since we've 
expanded the wildcard for the schema, we can retrieve what we need based on the 
expanded schema.
   This approach also allows us to provide correct and appropriate error 
messages for the user



-- 
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

Reply via email to