i often run into problems like this:

i need to write a Dataset[T] => Dataset[T], and inside i need to switch to
DataFrame for a particular operation.

but if i do:
dataset.toDF.map(...).as[T] i get error:
Unable to find encoder for type stored in a Dataset.

i know it has an encoder, because i started with Dataset[T]

so i would like to do:
dataset.toDF.map(...).as[T](dataset.encoder)

Reply via email to