title: left join same structured table with partitioning
body: <p>I have two same schema tables :-</p>
  
  <pre><code>Table A : vendorname,branch,amount,region (partitioned by year,month,day)
  Table B : vendorname,branch,amount,region (partitioned by year,month,day)
  </code></pre>
  
  <p>data in table A :</p>
  
  <pre><code>john,c1,112,us
   john,c2,113,uk
   john,c3,199,aus
  </code></pre>
  
  <p>data in table B:</p>
  
  <pre><code>john,c1,112,us
    john,c2,113,uk
    john,c3,99,aus
    john,c4,144,br
    john,c5,50,cr
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>john,c3,199,99,aus ==&gt; mismatch for 199 and 99
  </code></pre>
  
  <p>Need compare every record from table A to table B ..there can be additional records in b.
  I am trying with left join but not able to do.</p>
  
  <p>Query tried:</p>
  
  <pre><code>select * from (
  (select vendorname,type,amount,region from A 
  where vendorname='john' and  year='2018' and month='01' and day='01' ) t1
  left join
  (select vendorname,type,amount,region
  from B
  where vendorname='john' and  year='2018' and month='01' and day='01')t2
  on (a.name=b.name and a.type=b.type))
  </code></pre>
  
  <p>but getting nulls for matching column also</p>
  
  <p>I cannot query the whole table as it is partioned we need to pick data from specific partition else it will affect performance</p>