spark 报错 No implicits found for parameter evidence$4: Encoder
解决添加 import ssc.implicits._
// An highlighted block
//No implicits found for parameter evidence$4: Encoder
import scala.collection.JavaConversions._
import org.apache.spark.sql.SparkSession
import scala.collection.Seq
val ssc =SparkSession.builder().appName("testspark").master("local[2]").getOrCreate();
import ssc.implicits._
val df = ssc.createDataset(Seq(("aaa", 1, 2),("bbb", 3, 4),("ccc", 3, 5),("bbb", 4, 6))).toDF("key1","key2","key3")
df.printSchema
println(df.collect.toList)
结果如下图