title: Subquery in `where` with comparison operator
body: <p>Let's say I have a large table partitioned by <code>dt</code> field. I want to query this table for data after specific date. E.g.</p>
  
  <pre><code>select * from mytab where dt &gt;= 20140701;
  </code></pre>
  
  <p>The tricky part is that <strong>date</strong> is not a constant, but <strong>comes from a subquery</strong>. So basically I want something like this: </p>
  
  <pre><code>select * from mytab where dt &gt;= (select min(dt) from activedates);
  </code></pre>
  
  <p>Hive can't do it, however, giving me <code>ParseException</code> on subquery (from docs I'm guessing it's just not supported yet).</p>
  
  <p>So how do I restrict my query based on dynamic subquery?</p>
  
  <p>Note, that performance is key point here. So the faster, the better, even if it looks uglier. </p>
  
  <p>Also note, that we haven't switched to Hive 0.13 yet, so solutions without <code>in</code> query are preferred. </p>