title: Minus logic implementation not working with spark/scala
body: <p>Minus Logic in <code>Hive</code>:</p>
  
  <p>The below (<code>Hive</code>)query will return only  records available in left side table ( <code>Full_Table ft</code>), but not in both. </p>
  
  <pre><code>Select ft.* from Full_Table ft  left join Stage_Table stg where stg.primary_key1 IS  null and stg.primary_key2 IS null
  </code></pre>
  
  <p>I tried to implement the same in <code>spark</code>/<code>scala</code> using following method ( To support both primary key and composite key ) , But joined result set does not have <code>column</code> from right table, because of that not able to apply <code>stg.primary_key2 IS null</code> condition in joined result set.</p>
  
  <pre><code>ft.join(stg,usingColumns, “left_outer”)  // used seq to support composite key column join
  </code></pre>
  
  <p>Please suggest me how to implement minus logic in spark <code>scala</code>.</p>
  
  <p>Thanks,
  Saravanan
  <a href="https://www.linkedin.com/in/saravanan303/" rel="nofollow noreferrer">https://www.linkedin.com/in/saravanan303/</a></p>