-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnest
query does not allow one expression being referenced multiple times
#11198
Comments
unnest
query does not allow one expression being referenced multiple timesUnnest
query does not allow one expression being referenced multiple times
This should be a duplicate of #6543 |
Although theoretically #6543 can solve this ticket, but i think the bug presented here comes from the internal implementation inside try_process_unnest function itself, and can be fixed within this function
We also avoid unnecessary columns generated in the intermediate projection step |
datafusion/datafusion/sql/src/select.rs Line 344 in 58f79e1
At this line, before create new projection nodes, we can deduplicate intermediate unnest expr within inner_projection_exprs |
take |
I also found a different error for the following queries:
|
I think we can change expr from Debug to Display with this issue together. This todo is added in #11797 Expr::Unnest(Unnest { expr }) => {
// TODO: use Display instead of Debug, there is non-unique expression name in projection issue.
write!(f, "UNNEST({expr})")
} |
Describe the bug
Given this slt
Datafusion throws error
To Reproduce
No response
Expected behavior
unnest(expr) can be referenced multiple times within select statement
Additional context
No response
The text was updated successfully, but these errors were encountered: