Skip to content

Commit

Permalink
in the dsl, create a new schema instance in each applySchema
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Liang committed Sep 4, 2014
1 parent 4bba10c commit 05bd1e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ class SchemaRDD(
*/
private def applySchema(rdd: RDD[Row]): SchemaRDD = {
new SchemaRDD(sqlContext,
SparkLogicalPlan(ExistingRdd(queryExecution.analyzed.output, rdd))(sqlContext))
SparkLogicalPlan(
ExistingRdd(queryExecution.analyzed.output.map(_.newInstance), rdd))(sqlContext))
}

// =======================================================================
Expand Down

0 comments on commit 05bd1e4

Please sign in to comment.