cloud-fan commented on a change in pull request #35459:
URL: https://github.com/apache/spark/pull/35459#discussion_r803293226



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala
##########
@@ -214,12 +214,12 @@ object FileSourceStrategy extends Strategy with 
PredicateHelper with Logging {
       logInfo(s"Output Data Schema: ${outputSchema.simpleString(5)}")
 
       val metadataStructOpt = l.output.collectFirst {
-        case MetadataAttribute(attr) => attr
+        case FileSourceMetadataAttribute(attr) => attr
       }
 
       val metadataColumns = metadataStructOpt.map { metadataStruct =>
         metadataStruct.dataType.asInstanceOf[StructType].fields.map { field =>

Review comment:
       now we can do 
`metadataStruct.dataType.asInstanceOf[StructType].toAttributes`




-- 
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]

Reply via email to