Re: getting encoder implicits to be more accurate

2016-11-14 Thread Sam Goodwin
gt; > scala> val x = format.read(Row("a", Seq(Row("a", 5 > x: (String, Seq[(String, Option[Int])]) = (a,List((a,Some(5 > > scala> format.write(x) > res13: org.apache.spark.sql.Row = [a,List([a,5])] > > > > On Mon, Nov 14, 2016 at 3:10 PM, Koert

Re: getting encoder implicits to be more accurate

2016-11-01 Thread Sam Goodwin
You don't need compiler time macros for this, you can do it quite easily using shapeless. I've been playing with a project which borrows ideas from spray-json and spray-json-shapeless to implement Row marshalling for arbitrary case classes. It's checked and generated at compile time, supports arbit