You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2017/10/11 14:54:46 UTC

[GitHub] spark pull request #18386: [SPARK-21165] [SQL] [2.2] Use executedPlan instea...

Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18386#discussion_r144037286
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala ---
    @@ -111,9 +111,18 @@ object FileFormatWriter extends Logging {
         job.setOutputValueClass(classOf[InternalRow])
         FileOutputFormat.setOutputPath(job, new Path(outputSpec.outputPath))
     
    -    val allColumns = queryExecution.logical.output
    +    val allColumns = queryExecution.executedPlan.output
    --- End diff --
    
    This is problematic.  The physical plan may have different schema from logical plan(schema name may be different), and the writer should respect the logical schema as that what users expects.


---

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