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

Support non-tuple expression for in-subquery to join #4724

Closed
ygf11 opened this issue Dec 24, 2022 · 1 comment · Fixed by #4826
Closed

Support non-tuple expression for in-subquery to join #4724

ygf11 opened this issue Dec 24, 2022 · 1 comment · Fixed by #4826
Labels
enhancement New feature or request

Comments

@ygf11
Copy link
Contributor

ygf11 commented Dec 24, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This sql works in datafusion:

> select * from t1 where t1_id in (select t2_id from t2);

but following sql does not works:

> select * from t1 where t1_id + 11 in (select t2_id from t2);
NotImplemented("Physical plan does not support logical expression CAST(t1.t1_id AS Int64) + Int64(11) IN (<subquery>)")

Describe the solution you'd like
We can rewrite these subquery to join.

Describe alternatives you've considered

Additional context

@ygf11 ygf11 added the enhancement New feature or request label Dec 24, 2022
@ygf11 ygf11 changed the title Support non-tuple expression for subquery-filter to join optimizer Support non-tuple expression for subquery-filter to join rule Dec 24, 2022
@ygf11 ygf11 changed the title Support non-tuple expression for subquery-filter to join rule Support non-tuple expression for in-subquery to join Dec 24, 2022
@ygf11
Copy link
Contributor Author

ygf11 commented Dec 28, 2022

I am working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant