Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/6583#discussion_r31517707
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/sources/ddl.scala ---
@@ -322,19 +322,10 @@ private[sql] object ResolvedDataSource {
Some(partitionColumnsSchema(data.schema, partitionColumns)),
caseInsensitiveOptions)
- // For partitioned relation r, r.schema's column ordering is
different with the column
- // ordering of data.logicalPlan. We need a Project to adjust the
ordering.
- // So, inside InsertIntoHadoopFsRelation, we can safely apply the
schema of r.schema to
- // the data.
- val project =
- Project(
- r.schema.map(field => new
UnresolvedAttribute(Seq(field.name))),
--- End diff --
This `r.schema` is where metadata discovery is triggered.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]