title: How to pass join condition as a parameter to spark dataframe joins
body: <p>I want to perform broadcast join as follow :</p>
  
  <pre><code>val z = main.as("m").join(broadcast(df.as("i")), $"m.sno" === $"i.sno", "left_outer")
  </code></pre>
  
  <p>But I want to pass join condition <code>$"m.sno" === $"i.sno"</code> as an argument.</p>
  
  <p>I tried following ways:
  First</p>
  
  <pre><code>val cond = """ $"m.sno" === $"i.sno" """
  val z = main.as("m").join(broadcast(df.as("i")), $cond, "left_outer")
  </code></pre>
  
  <p>I found out parameter in join has to be column. So I converted it to column and tried.</p>
  
  <pre><code>val c = col(c)
  val z = main.as("m").join(broadcast(df.as("i")), c, "left_outer")
  </code></pre>
  
  <p>I'm still getting error. How to resolve this.
  NOTE: 'cond' variable will be String. </p>