goldmedal commented on issue #14380: URL: https://github.com/apache/datafusion/issues/14380#issuecomment-2644487765
> Perhaps [@goldmedal](https://github.com/goldmedal) have some thoughts on it. The original discussion about wildcard expansion is https://github.com/apache/datafusion/issues/11639#issuecomment-2250895868. It's used to delay the wildcard expansion to decrease the cost when facing huge column numbers (https://github.com/apache/datafusion/issues/11639#issuecomment-2253671162). > We won't need to perform wildcard expansion when [computing schemas](https://github.com/apache/datafusion/blob/f9cc3325cdb5891b7566a6f3503c1f7ac6ad51e0/datafusion/expr/src/utils.rs#L706), which is a duplicated operation. Indeed. I have no idea how to avoid this 🤔. Maybe moving wildcard expansion back to the builder is the only choice (? > That could potentially unlock removing Expr::Wildcard. It's not really an expression (just like Expr::Alias isn't https://github.com/apache/datafusion/issues/1468 and Sort weren't https://github.com/apache/datafusion/issues/12193) I'm not pretty sure if `Expr::Wildcard` is meaningful in the logical plan phase but our project (Wren AI) will generate a different plan for the table according to `Wildcard` usage. However, if removing `Wildcard` from the logical plan phase is beneficial for the logical planner, it's ok for me to remove it. We can find another approach to do the same thing. -- 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