title: Join two Spark Dataframes on Multiple Fields
body: <p>I am trying to join two dataframes in Spark on multiple fields. I tried this:</p>
  
  <pre><code>df1.
     join(df2, df1$col1 == df2$col2 &amp;&amp; df1$col3 == df2$col4)
  </code></pre>
  
  <p>But this does not work (there are a range of errors, I can list if needed).</p>
  
  <p>Is there a better way to write this? I need to do this in Spark, not pySpark, etc.</p>