LiaCastaneda commented on code in PR #22530: URL: https://github.com/apache/datafusion/pull/22530#discussion_r3304890145
########## datafusion/sqllogictest/test_files/subquery.slt: ########## @@ -2091,6 +2091,95 @@ SELECT (SELECT v FROM (SELECT 1 AS v UNION ALL SELECT 2) AS t ORDER BY v LIMIT 1 ---- 1 +############# +## End-to-end correctness coverage for the flag-off path. +## When `datafusion.optimizer.physical_uncorrelated_scalar_subquery` is false, +## uncorrelated scalar subqueries are rewritten to left joins by +## `ScalarSubqueryToJoin` instead of executed by `ScalarSubqueryExec`. This +## restores pre-PR-21240 behavior, which has three known shortcomings the +## physical-execution path was built to fix: multi-row subqueries silently +## return wrong results, and uncorrelated scalar subqueries do not work in +## ORDER BY / JOIN ON / aggregate-function arguments. Those cases are +## intentionally not covered here; the queries below are the ones where both +## paths agree. Review Comment: These were known limitations/bugs https://github.com/apache/datafusion/pull/21240 fixed -- 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]
