tlfua commented on issue #27691: URL: https://github.com/apache/datafusion/issues/27691#issuecomment-7209003629
Thanks for the report and the clear reproducer. I opened #27783 for the schema error. When a correlated filter is pulled up above a join inside the subquery, the join kept its old schema, so the column the filter reads was missing. With the fix, the same shape with an equality predicate (for example `WHERE a = o.a`) returns correct results for scalar, `EXISTS`, `NOT EXISTS` and `IN` subqueries. For the query in this issue, the result after the fix is `This feature is not implemented: Physical plan does not support logical expression ScalarSubquery(<subquery>)`, not `0`. The predicate `e.x < o.a` is a non-equality correlated predicate, and DataFusion does not decorrelate correlated scalar subqueries with such predicates yet (see `#non_equal_correlated_scalar_subquery` in `subquery.slt`). I also tried the two variants from the description on current `main`, without the rename and without the join. Both fail with the same `not implemented` error, so the rename and the join only change which error you get first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
