title: How to query between two tables using IF(condition, tableA, tableB) in Hive?
body: <p>I want to do a query based on a logic condition to query between two tables.</p>
  
  <pre><code>select *
  from if(1&gt;2, tableA, tableB)
  </code></pre>
  
  <p><code>1&gt;2</code> above is simply one example logic test, it can be any logic value.</p>
  
  <p>But <code>if</code> function in Hive cannot work within <code>FROM</code> above. Any idea how?</p>