mihailoale-db opened a new pull request, #50935: URL: https://github.com/apache/spark/pull/50935
### What changes were proposed in this pull request? Validation for outer references in subquery expressions is done in the bottom up manner in single-pass resolver. In other words, we do the validation right after we resolve the subquery expression and at that moment missing attributes haven't been pushed down yet. Because of that, we fail with `UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.MUST_AGGREGATE_CORRELATED_SCALAR_SUBQUERY`. With the validation disabled, we fail with `UNRESOLVED_COLUMN.WITH_SUGGESTION` on the unhappy path and pass on the happy path which was intended. ### Why are the changes needed? To fix the single-pass analyzer. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org