【问题标题】:can not resolve symbol after import the correct package in intellij在intellij中导入正确的包后无法解析符号
【发布时间】:2018-10-28 09:05:51
【问题描述】:

我想使用org.apache.spark.sql.Column中的when()方法,当我继续进行时,结果是这样的。 enter image description here

我尝试过类似的东西 IntelliJ inspection gives "Cannot resolve symbol" but still compiles code 但它就是不起作用,我现在该怎么办?

【问题讨论】:

    标签: scala apache-spark intellij-idea apache-spark-sql


    【解决方案1】:

    when() 在 the org.apache.spark.sql.functions 里面

    所以你需要import函数作为

    import org.apache.spark.sql.functions._
    

    或

    import org.apache.spark.sql.functions.when
    

    【讨论】:

      猜你喜欢
      • 2020-01-22
      • 2015-01-13
      • 2022-01-05
      • 2014-06-28
      • 1970-01-01
      • 1970-01-01
      • 2016-07-15
      • 2015-02-12
      相关资源
      最近更新 更多