neilconway opened a new pull request, #22313: URL: https://github.com/apache/datafusion/pull/22313
## Which issue does this PR close? - Closes #21210. ## Rationale for this change If a query contained two or more structurally equal correlated subqueries, we previously would produce incorrect query results. This was caused by using `Subquery` as a hashmap key; if we use the subquery alias instead, we can avoid the unintended key collision. Using the alias (a string) as the hashmap key is also safer and more efficient than hashing on a complex type like `Subquery`. ## What changes are included in this PR? * Fix for bug in `ScalarSubqueryToJoin` rewrite pass * SLT test ## Are these changes tested? Yes, with new test added. ## Are there any user-facing changes? No, aside from fixing the previously incorrect query results. -- 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]
