This has to be done manually: rdd2.map(row => Person(row.getString(0), row.getInt(1)))
On Fri, Oct 17, 2014 at 9:30 AM, Akshat Aranya <aara...@gmail.com> wrote: > Hi, > > How can I convert an RDD loaded from a Parquet file into its original type: > > case class Person(name: String, age: Int) > > val rdd: RDD[Person] = ... > rdd.saveAsParquetFile("people") > > val rdd2: sqlContext.parquetFile("people") > > How can I map rdd2 back into an RDD[Person]? All of the examples just > show how to use the RDD loaded from Parquet using SQL. >