Error: not found: value lit/when - spark scala
<p>I am using scala, spark, IntelliJ and maven.</p>

<p>I have used below code : </p>

<pre><code>val joinCondition = when($"exp.fnal_expr_dt" &gt;= $"exp.nonfnal_expr_dt",
$"exp.manr_cd"===$"score.MANR_CD")

val score = exprDF.as("exp").join(scoreDF.as("score"),joinCondition,"inner")
</code></pre>

<p>and</p>

<pre><code>val score= list.withColumn("scr", lit(0))
</code></pre>

<p>But when try to build using maven, getting below errors - </p>

<blockquote>
  <p>error: not found: value when</p>
</blockquote>

<p>and</p>

<blockquote>
  <p>error: not found: value lit</p>
</blockquote>

<p>For <code>$</code> and <code>===</code> I have used <code>import sqlContext.implicits.StringToColumn</code> and it is working fine. No error occurred at the time of maven build.But for <code>lit(0)</code> and <code>when</code> what I need to import or is there any other way resolve the issue. </p>