Skip to content
Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ class SQLContext(@transient val sparkContext: SparkContext)
rdd: RDD[Array[Any]],
schema: StructType): SchemaRDD = {
import scala.collection.JavaConversions._
import scala.collection.convert.Wrappers.{JListWrapper, JMapWrapper}

def needsConversion(dataType: DataType): Boolean = dataType match {
case ByteType => true
Expand All @@ -482,8 +481,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
case (null, _) => null

case (c: java.util.List[_], ArrayType(elementType, _)) =>
val converted = c.map { e => convert(e, elementType)}
JListWrapper(converted)
c.map { e => convert(e, elementType)}: Seq[Any]

case (c, ArrayType(elementType, _)) if c.getClass.isArray =>
c.asInstanceOf[Array[_]].map(e => convert(e, elementType)): Seq[Any]
Expand Down