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?

Reply via email to