Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/19474#discussion_r144198270 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala --- @@ -117,7 +117,7 @@ object FileFormatWriter extends Logging { job.setOutputValueClass(classOf[InternalRow]) FileOutputFormat.setOutputPath(job, new Path(outputSpec.outputPath)) - val allColumns = plan.output + val allColumns = queryExecution.logical.output --- End diff -- Explicitly using `analyzed`'s schema is better here.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org