change underlying type of JavaSchemaRDD as scala