title: Hive join with OR condition
body: <p>I've got pretty big table <code>TAB1</code> and I need to select rows from it which match conditions </p>
  
  <pre><code>(TAB1.KEY1 = TAB2.KEY1 OR TAB1.KEY1 = TAB2.KEY2) AND TAB1.KEY2 = TAB2.KEY3 
  </code></pre>
  
  <p>where <code>TAB2</code> is a very little table.</p>
  
  <p>I can't do it just by joining these two tables in hive because hive doesn't support joins with OR conditions. I tried to separate these condition by using union clause but it seems it's much more expensive because of two joins with big table.</p>
  
  <p>Is there any better way to do the job? P.S. I use hive 0.13</p>