title: How to filter a lateral view in hive?
body: <p>Suppose I wish to filter down a huge table with a LATERAL VIEW by using a JOIN.  Example:</p>
  
  <pre><code>SELECT things.*
  FROM a_few_objects fo join
   (SELECT an_id,
          object.id as object_id,
          object.big_thing
    FROM big_table
    LATERAL VIEW EXPLODE(outer_things) ot AS outer_thing
    LATERAL VIEW EXPLODE(objects) o AS object) things
  ON fo.objectid = things.object_id
  </code></pre>
  
  <p>Is there a more efficient way to do this than instantiate the "things" subquery (which I think puts on disk a huge table)?</p>
  
  <p>I could put the rows of a_few_objects in the WHERE clause of the inner query, but I want to specify a_few_objects in Hive, so I don't have to change the query all the time.</p>
  
  <p>If I put the join inside the subquery, Hive just gets confused. I'm using Hive 0.13.</p>