-
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
Wrong projection after optimize_projections rule #9109
Comments
We will take a look and address next week. Thanks |
Possibly related #9111 |
I think this is working as designed as explained in #9131 (review) , though perhaps we could improve the design. |
When I run the queries as you described in the issue body. I got the following plan:
Considering #9131 review. I don't think these plans are wrong or sub-optimal. @jiacai2050 Can you try your queries in the main branch (not in the latest release) if possible. Because, I couldn't reproduce the logical plan in the issue. |
@mustafasrepo Sorry for my delayed response, I will re-check this using latest main branch this week. |
## Rationale Close #1461 ## Detailed Changes Bump datafusion to https://github.com/CeresDB/arrow-datafusion/commits/e21b03154, which is version 33. Some important breaking changes: - apache/datafusion#7920 - apache/datafusion#9109 ## Test Plan CI --------- Co-authored-by: jiacai2050 <[email protected]>
Closed since this is expected, thanks everyone involved. For other developers, if you have met this issue, you can check how I "workaround" this issue here |
Describe the bug
When upgrade latest datafusion from a old version, I found
optimize_projections
rule produce wrong projection. Eg:Only x will be included in
projection
, y is missing from the plan.To Reproduce
First apply following changes, the purpose is to push down all filters
https://github.com/apache/arrow-datafusion/blob/f4fc2639f1d9d1f4dbc73d39990a83f6bf7a725f/datafusion/optimizer/src/push_down_filter.rs#L887
Then run datafusion-cli:
Then we will get
Expected behavior
The right projection should be
[x, y]
.Additional context
No response
The text was updated successfully, but these errors were encountered: