cloud-fan commented on code in PR #40321: URL: https://github.com/apache/spark/pull/40321#discussion_r1131939457
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala: ########## @@ -1033,9 +1033,12 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor requiredAttrIds.contains(a.exprId)) => s.withMetadataColumns() case p: Project if p.metadataOutput.exists(a => requiredAttrIds.contains(a.exprId)) => + // Inject the requested metadata columns into the project's output, if not already present. Review Comment: > but it's not available because the SubqueryAlias blocked it, this rule kept endlessly (re)appending the metadata column Make sense. So this change is a safe guard -- 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