Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
indent
  • Loading branch information
eatoncys committed Dec 10, 2018
commit 56cf4e5f079c6ddd36de197eecc3b51393a5859b
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ import org.apache.spark.sql.execution.metric.SQLMetrics
import org.apache.spark.sql.types.StructType

object RDDConversions {
def productToRowRdd[A <: Product : TypeTag](data: RDD[A],
outputSchema: StructType): RDD[InternalRow] = {
def productToRowRdd[A <: Product : TypeTag](
data: RDD[A],
outputSchema: StructType): RDD[InternalRow] = {
val converters = ExpressionEncoder[A].resolveAndBind(outputSchema.toAttributes)
data.mapPartitions { iterator =>
iterator.map { r =>
Expand Down