:29: error: overloaded method value join with alternatives:(right: org.apache.spark.sql.Dataset[_],joinExprs: org.apache.spark.sql.Column)org.apache.spark.sql.DataFrame

在scala中执行如下代码,报 join 错误!!

scala> val data = itemTotalTime.join(totalTime, "userId")

  错误日志如下:

<console>:29: error: overloaded method value join with alternatives:
  
  (right: org.apache.spark.sql.Dataset[_],usingColumns: Seq[String])org.apache.spark.sql.DataFrame <and>
  (right: org.apache.spark.sql.Dataset[_],usingColumn: String)org.apache.spark.sql.DataFrame
 cannot be applied to (Unit, String)
           val data = itemTotalTime.join(totalTime, "userId")
                                    ^

  <console>:29: error: overloaded method value join with alternatives:(right: org.apache.spark.sql.Dataset[_],joinExprs: org.apache.spark.sql.Column)org.apache.spark.sql.DataFrame <and>

 

 

分析:应该是join的一边是DataFram 一边是Dataset 的原因,我把这两个 itemTotalTime、totalTime 都  .toDF 了一下就好了

--------------------------------记录一下---------------------------------

 

<console>:29: error: overloaded method value join with alternatives:(right: org.apache.spark.sql.Dataset[_],joinExprs: org.apache.spark.sql.Column)org.apache.spark.sql.DataFrame <and>

上一篇:Axure RP Extension for Chrome插件添加方法


下一篇:第五章:数据库完整性