Scala错误未关闭的字符文字访问数据帧

时间:2017-10-29 00:24:02

标签: scala apache-spark

尝试使用Scala访问Spark的Dataframe操作时, 返回字符文字错误。 [ERROR] /home/cloudera/sharedCloudera-vm/hw3-skeleton/Q2/src/main/scala/edu/gatech/cse6242/Q2.scala:25: error: unclosed character literal [INFO] val filterNodes = nodes.filter(df('weight')>=5)

1 个答案:

答案 0 :(得分:-3)

问题在于单引号''

使用双引号“

解决

val filterNodes = nodes.filter(df("weight")>=5)