title: not enough arguments for method when: Spark/scala dataframe
body: <p>I have 2 Dataframes in spark Df1 and Df2 i am joining these 2 Dataframes based on one common column i.e. Id ,and then added one extra column result and checking multiple column with or condition if any of column data matched then i need to insert in new column as matched and if no condition matched then need to pass as 'Not Matched' in that column. I am writing below code.</p>
  
  <pre><code>    df1.join(df1,df2("id") === df2("id"))
     .withColumn("Result",
     when(
     df1("adhar_no") === df2("adhar_no")" || 
     df1("pan_no") === df2("pan_no") || 
     df1("Voter_id") === df2("Voter_id") || 
     df1("DL_no") === df2("DL_no"),"Matched"
    ).otherwise("Not Matched"))
  
    But getting error
  
    &lt;console&gt;:60: error: not enough arguments for method when: (condition: org.apache.spark.sql.Column, value: Any)org.apache.spark.sql.Column. Unspecified value parameter value.
  
    I have also tried below code
  
      df1.join(df2,df1("id") === df2("id"))
     .withColumn("Result",when(df1("adhar_no") === df2("adhar_no") || 
     when(df1("pan_no") === df2("pan_no") || 
     when(df1("Voter_id") === df2("Voter_id") ||  
     when(df1("DL_no") === df2("DL_no"),"Matched"))))
    .otherwise("Not Matched"))
  </code></pre>
  
  <p>In both the cases i am getting error can anyone plase help how should i do this.</p>