Skip to content

Commit 1aafabd

Browse files
committed
Updates comments
1 parent 088abaa commit 1aafabd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/sources/commands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private[sql] case class InsertIntoHadoopFsRelation(
9696
// We create a DataFrame by applying the schema of relation to the data to make sure.
9797
// We are writing data based on the expected schema,
9898
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
100100
// ordering of data.logicalPlan (partition columns are all moved after data column). We
101101
// need a Project to adjust the ordering, so that inside InsertIntoHadoopFsRelation, we can
102102
// safely apply the schema of r.schema to the data.

sql/core/src/main/scala/org/apache/spark/sql/sources/ddl.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ private[sql] object ResolvedDataSource {
322322
Some(partitionColumnsSchema(data.schema, partitionColumns)),
323323
caseInsensitiveOptions)
324324

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.
325328
sqlContext.executePlan(
326329
InsertIntoHadoopFsRelation(
327330
r,

0 commit comments

Comments
 (0)