Importing spark.implicits._ in scala

前端 未结 8 1132
感情败类
感情败类 2020-12-25 09:33

I am trying to import spark.implicits._ Apparently, this is an object inside a class in scala. when i import it in a method like so:

def f() = {
  val spark          


        
8条回答
  •  时光说笑
    2020-12-25 10:10

    I know this is old post but just would like to share my pointers on this I think the issue with the way you are declaring the sparkSession .When you declare sparkSession as var that does not make it immutable which can change later point of time .So it doesn't allow importing the implicits on that as it might lead to ambiguity as later stage it can be changed where as it's not same in case of val

提交回复
热议问题