Encoder for Row Type Spark Datasets

后端 未结 2 1226
臣服心动
臣服心动 2021-01-30 13:45

I would like to write an encoder for a Row type in DataSet, for a map operation that I am doing. Essentially, I do not understand how to write encoders.

Below is an exam

2条回答
  •  悲哀的现实
    2021-01-30 14:39

    I had the same problem... Encoders.kryo(Row.class)) worked for me.

    As a bonus, the Apache Spark tuning docs refer to Kryo it since it’s faster at serialization "often as much as 10x":

    https://spark.apache.org/docs/latest/tuning.html

提交回复
热议问题