title: How to use array_contains with 2 columns in spark scala?
body: <p>I have an issue , I want to check if an array of string contains string present in another column . I am currently using below code which is giving an error.</p>
  
  <pre><code>.withColumn("is_designer_present", when(array_contains(col("list_of_designers"),$"dept_resp"),1).otherwise(0))
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>java.lang.RuntimeException: Unsupported literal type class org.apache.spark.sql.ColumnName dept_resp
    at org.apache.spark.sql.catalyst.expressions.Literal$.apply(literals.scala:77)
  </code></pre>