Skip to content

Commit f968195

Browse files
committed
Use analyzed attributes when applying the schema.
1 parent 4969015 commit f968195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ class SchemaRDD(
430430
* @group schema
431431
*/
432432
private def applySchema(rdd: RDD[Row]): SchemaRDD = {
433-
new SchemaRDD(sqlContext, SparkLogicalPlan(ExistingRdd(logicalPlan.output, rdd)))
433+
new SchemaRDD(sqlContext, SparkLogicalPlan(ExistingRdd(queryExecution.analyzed.output, rdd)))
434434
}
435435

436436
// =======================================================================

0 commit comments

Comments
 (0)