Encoders are just an object based view on a Dataset. Until you actually materialize and object, they are not used and thus will not change the schema of the dataframe.
On Tue, Jan 24, 2017 at 8:28 AM, Koert Kuipers <ko...@tresata.com> wrote: > scala> val x = Seq("a", "b").toDF("x") > x: org.apache.spark.sql.DataFrame = [x: string] > > scala> x.as[Array[Byte]].printSchema > root > |-- x: string (nullable = true) > > scala> x.as[Array[Byte]].map(x => x).printSchema > root > |-- value: binary (nullable = true) > > why does the first schema show string instead of binary? >