Skip to content

Commit

Permalink
output dictionaries correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ahirreddy committed Apr 15, 2014
1 parent be079de commit 4fe1319
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,10 @@ class SchemaRDD(
def analyze = sqlContext.analyzer(logicalPlan)

def javaToPython: JavaRDD[Array[Byte]] = {
//val fieldNames: Seq[String] = logicalPlan.references.map(_.name)
val fieldNames: Seq[String] = this.queryExecution.analyzed.output.map(_.name)
this.mapPartitions { iter =>
val pickle = new Pickler
iter.map { row =>
val fieldNames: Seq[String] = (1 to row.length).map(_.toString + "KEY") //TODO: Temporary
val map: JMap[String, Any] = new java.util.HashMap
val arr: java.util.ArrayList[Any] = new java.util.ArrayList
row.zip(fieldNames).foreach { case (obj, name) =>
Expand Down

0 comments on commit 4fe1319

Please sign in to comment.