Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11509#discussion_r55117222
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelation.scala
 ---
    @@ -101,45 +111,28 @@ private[sql] case class InsertIntoHadoopFsRelation(
           job.setOutputValueClass(classOf[InternalRow])
           FileOutputFormat.setOutputPath(job, qualifiedOutputPath)
     
    -      // A partitioned relation schema's can be different from the input 
logicalPlan, since
    -      // partition columns are all moved after data column. We Project to 
adjust the ordering.
    -      // TODO: this belongs in the analyzer.
    -      val project = Project(
    -        relation.schema.map(field => 
UnresolvedAttribute.quoted(field.name)), query)
    -      val queryExecution = DataFrame(sqlContext, project).queryExecution
    +      val partitionSet = AttributeSet(partitionColumns)
    +      val dataColumns = query.output.filterNot(partitionSet.contains)
     
    +      val queryExecution = DataFrame(sqlContext, query).queryExecution
    --- End diff --
    
    Use QueryExecution directly instead of DataFrame here?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to