Skip to content

Commit 05bd1e4

Browse files
author
Eric Liang
committed
in the dsl, create a new schema instance in each applySchema
1 parent 4bba10c commit 05bd1e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ class SchemaRDD(
428428
*/
429429
private def applySchema(rdd: RDD[Row]): SchemaRDD = {
430430
new SchemaRDD(sqlContext,
431-
SparkLogicalPlan(ExistingRdd(queryExecution.analyzed.output, rdd))(sqlContext))
431+
SparkLogicalPlan(
432+
ExistingRdd(queryExecution.analyzed.output.map(_.newInstance), rdd))(sqlContext))
432433
}
433434

434435
// =======================================================================

0 commit comments

Comments
 (0)