HairstonE opened a new pull request, #22915: URL: https://github.com/apache/datafusion/pull/22915
## Which issue does this PR close? - Closes #22477. ## Rationale for this change `= ANY (SELECT ...)` and `<> ALL (SELECT ...)` decorrelate into stacked mark joins. The optimizer was pruning each mark join's right child to zero columns, which dropped its table reference. Without a qualifier, every mark column came out named just `mark`, resulting in the schema error. ## What changes are included in this PR? Mark joins now keep one column from the right child instead of pruning it down to nothing. The right child holds onto its table reference, the mark now stays qualified. ## Are these changes tested? A unit test builds three stacked mark joins and checks the plan optimizes without the schema error. An sqllogictest runs `= ANY` and `<> ALL` end-to-end against a small table. ## Are there any user-facing changes? No. -- 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]
