Options should work. Can you give a full example that is freezing? Which version of Spark are you using?
On Fri, Apr 7, 2017 at 6:59 AM, Dirceu Semighini Filho < dirceu.semigh...@gmail.com> wrote: > Hi Devs, > I've some case classes here, and it's fields are all optional > case class A(b:Option[B] = None, c: Option[C] = None, ...) > > If I read some data in a DataSet and try to connvert it to this case class > using the as method, it doesn't give me any answer, it simple freeze. > If I change the case class to > > case class A(b:B,c:C) > id work nice and return the field values as null. > > Option fields aren't supported by the as method or is this an Issue? > > Kind Regards, > Dirceu >