Skip to content
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

rewrite_expression does not properly handle Exists and ScalarSubquery #2736

Closed
alamb opened this issue Jun 15, 2022 · 1 comment · Fixed by #2765
Closed

rewrite_expression does not properly handle Exists and ScalarSubquery #2736

alamb opened this issue Jun 15, 2022 · 1 comment · Fixed by #2765
Labels
bug Something isn't working datafusion Changes in the datafusion crate good first issue Good for newcomers optimizer Optimizer rules

Comments

@alamb
Copy link
Contributor

alamb commented Jun 15, 2022

Describe the bug
@Ted-Jiang found and fixed a bug (#2729) related to the fact an optimizer function rewrite_expression did not handle Expr::InList correctly

During review @andygrove and I noticed there were likely some other Expr variants that suffered from the same issue: #2729 (comment)

To Reproduce
Make a pushdown expression with the exprs following the model @Ted-Jiang used in #2729

Expected behavior
Any expr that contains an Expr within it should be rewritten

The goal would be to review expr_expressions and ensure each variant matches the corresponding variant in rewrite_expression. Bonus point for removing expr_expressions and rewrite_expression and instead use an ExprMutator

Additional context
See above

@alamb alamb added bug Something isn't working good first issue Good for newcomers datafusion Changes in the datafusion crate optimizer Optimizer rules labels Jun 15, 2022
@mrob95
Copy link
Contributor

mrob95 commented Jun 21, 2022

I will take a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datafusion Changes in the datafusion crate good first issue Good for newcomers optimizer Optimizer rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants