tomvanbussel opened a new pull request, #47604: URL: https://github.com/apache/spark/pull/47604
### What changes were proposed in this pull request? This PR modifies `SubqueryAlias` to always propagate the metadata output of its child, even if the child is not a `SubqueryAlias` or a `LeafNode`. ### Why are the changes needed? This is needed because with these changes it is not possible to read metadata columns when reading a table with a CHAR column when read-side padding is enabled. In the case the plan is `SubqueryAlias(Project(LeafNode)))`, so without this patch the metadata output is not propagated. ### Does this PR introduce _any_ user-facing change? Yes, there will be more cases in which the metadata columns can be accessed, and users will no longer get an exception in these cases. ### How was this patch tested? Added a case to `MetadataColumnSuite`. ### 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