-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SQL case, This feature is not implemented: Physical plan does not support logical expression EXISTS (<subquery>) #5789
Comments
i'm not sure,does this pr #5419 cause this issue. |
I agree that #5419 likely caused this issue. I think the fix is to simply ignore such errors when creating pruning predicates (aka when the predicate is not supported). What do you think @crepererum ? |
To me this looks like a bug. Who's trying to push down / apply a sub-query predicate to a parquet file read? Shouldn't the logical optimizer remove these kind of expressions? |
@crepererum I think you're right, just your PR let this issue expose. these Exists, InSubquery, ScalarSubquery Expr did not complete the corresponding processing Before your PR takes effect, it also does not actually handle the subquery scene at datasource so, i think the way is to optimize non-correlated subquery at decorrelate_where_exists optimizer the current decorrelate_where_exists only optimize
we need process ScalarSubquery in the create_physical_expr and then rewrite non-correlated exists subquery to ScalarSubquery
|
For the record this still happens:
|
This now works in datafusion 43 > SELECT a, b FROM t1 WHERE EXISTS (SELECT count(*) FROM t2);
+---+---+
| a | b |
+---+---+
+---+---+
0 row(s) fetched.
Elapsed 0.002 seconds. |
Describe the bug
DataFusion v21.0.0
return:
This feature is not implemented: Physical plan does not support logical expression EXISTS ()
worked branch
19.0.0
To Reproduce
create data.csv
echo "1,2" > data.csv
use datafusion-cli
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: