karenfeng commented on a change in pull request #31666:
URL: https://github.com/apache/spark/pull/31666#discussion_r605088737
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1727,7 +1744,7 @@ class Analyzer(override val catalogManager:
CatalogManager)
case q: LogicalPlan =>
logTrace(s"Attempting to resolve
${q.simpleString(conf.maxToStringFields)}")
- q.mapExpressions(resolveExpressionByPlanChildren(_, q))
+ q.mapExpressions(resolveExpressionByPlanChildren(_, q, withMetadata =
true))
Review comment:
The output ordering inconsistency was due to the `Sort` rule in
`ResolveReferences` resolving with metadata columns (which doesn't fall back to
this case), when it should have waited for the `Sort` rule in
`ResolveMissingReferences`. We still need to be able to resolve metadata
columns somewhere.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]