Skip to content
Prev Previous commit
Next Next commit
Fix dataFrameToSeqScanNode
  • Loading branch information
zsxwing committed Aug 27, 2015
commit 22e7bc0b9882b637bb06ee39a66d3ece789042fa
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,9 @@ class LocalNodeTest extends SparkFunSuite {
}

protected def dataFrameToSeqScanNode(df: DataFrame): SeqScanNode = {
val output = df.queryExecution.sparkPlan.output
val converter =
CatalystTypeConverters.createToCatalystConverter(StructType.fromAttributes(output))
new SeqScanNode(
output,
df.collect().map(r => converter(r).asInstanceOf[InternalRow]))
df.queryExecution.sparkPlan.output,
df.queryExecution.toRdd.map(_.copy()).collect())
}

}
Expand Down