ulysses-you commented on code in PR #46537:
URL: https://github.com/apache/spark/pull/46537#discussion_r1597404307
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala:
##########
@@ -118,7 +118,9 @@ abstract class LogicalPlan
def resolve(schema: StructType, resolver: Resolver): Seq[Attribute] = {
schema.map { field =>
resolve(field.name :: Nil, resolver).map {
- case a: AttributeReference => a
+ case a: AttributeReference =>
+ // Keep the metadata in given schema.
+ a.copy(metadata = field.metadata)(exprId = a.exprId, qualifier =
a.qualifier)
Review Comment:
`a.withMetadata(field.metadata)`
--
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]