File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
sql/core/src/main/scala/org/apache/spark/sql/sources Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ private[sql] case class InsertIntoHadoopFsRelation(
96
96
// We create a DataFrame by applying the schema of relation to the data to make sure.
97
97
// We are writing data based on the expected schema,
98
98
val df = {
99
- // For partitioned relation r, r.schema's column ordering is different with the column
99
+ // For partitioned relation r, r.schema's column ordering can be different from the column
100
100
// ordering of data.logicalPlan (partition columns are all moved after data column). We
101
101
// need a Project to adjust the ordering, so that inside InsertIntoHadoopFsRelation, we can
102
102
// safely apply the schema of r.schema to the data.
Original file line number Diff line number Diff line change @@ -322,6 +322,9 @@ private[sql] object ResolvedDataSource {
322
322
Some (partitionColumnsSchema(data.schema, partitionColumns)),
323
323
caseInsensitiveOptions)
324
324
325
+ // For partitioned relation r, r.schema's column ordering can be different from the column
326
+ // ordering of data.logicalPlan (partition columns are all moved after data column). This
327
+ // will be adjusted within InsertIntoHadoopFsRelation.
325
328
sqlContext.executePlan(
326
329
InsertIntoHadoopFsRelation (
327
330
r,
You can’t perform that action at this time.
0 commit comments