Skip to content

Commit

Permalink
Updates comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Jun 2, 2015
1 parent 088abaa commit 1aafabd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private[sql] case class InsertIntoHadoopFsRelation(
// We create a DataFrame by applying the schema of relation to the data to make sure.
// We are writing data based on the expected schema,
val df = {
// For partitioned relation r, r.schema's column ordering is different with the column
// For partitioned relation r, r.schema's column ordering can be different from the column
// ordering of data.logicalPlan (partition columns are all moved after data column). We
// need a Project to adjust the ordering, so that inside InsertIntoHadoopFsRelation, we can
// safely apply the schema of r.schema to the data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ private[sql] object ResolvedDataSource {
Some(partitionColumnsSchema(data.schema, partitionColumns)),
caseInsensitiveOptions)

// For partitioned relation r, r.schema's column ordering can be different from the column
// ordering of data.logicalPlan (partition columns are all moved after data column). This
// will be adjusted within InsertIntoHadoopFsRelation.
sqlContext.executePlan(
InsertIntoHadoopFsRelation(
r,
Expand Down

0 comments on commit 1aafabd

Please sign in to comment.