title: hive array posexplode issue
body: <p>Hi I have a scenario using hive array explode</p>
  
  <p>I have a hive table with multiple arrays (4 arrays)</p>
  
  <pre><code>desc manager;
  OK
  supervisorid            int                                         
  reportee_name           array&lt;string&gt;                               
  reportee_age            array&lt;string&gt;                               
  reportee_address        array&lt;string&gt;                               
  reportee_occupation     array&lt;string&gt;                               
  reportee_salary         array&lt;string&gt;
  </code></pre>
  
  <p>the above 4 arrays are dependent (like the nth element of each array is mapped to nth element of other arrays.</p>
  
  <p>But there are some scenarios where i may get no values for a n element of a particluar array when other dependent array's n element has values.
  Example</p>
  
  <pre><code>select * from manager;
  OK
  101 ["richie","tom","jack"] ["36","28","29"]    ["abc","xyz"]   ["SE","JSE","SE"]   ["5000","3000","6000"]
  </code></pre>
  
  <p>when all array columns reportee_name,reportee_age,reportee_occupation,reportee_salary has 3 elemnts while reportee_address has only 2 elemnts</p>
  
  <p>So when i do posexplode lateral view i will be getting only the 2 elements </p>
  
  <pre><code>select supervisorid,reportee_name_val,reportee_age_val,reportee_address_val,reportee_occupation_val,reportee_salary_val from manager lateral view posexplode(reportee_name)reportee_name  as reportee_name_pos,reportee_name_val lateral view posexplode(reportee_age)reportee_age as reportee_age_pos,reportee_age_val lateral view posexplode (reportee_address)reportee_address as reportee_address_pos,reportee_address_val lateral view posexplode (reportee_occupation)reportee_occupation as reportee_occupation_pos,reportee_occupation_val lateral view posexplode(reportee_salary)reportee_salary as reportee_salary_pos,reportee_salary_val where reportee_name_pos&lt;=&gt;reportee_age_pos and reportee_age_pos&lt;=&gt;reportee_address_pos and reportee_address_pos&lt;=&gt;reportee_occupation_pos and reportee_occupation_pos&lt;=&gt;reportee_salary_pos; 
  OK
  101 richie  36  abc SE  5000
  101 tom 28  xyz JSE 3000
  Time taken: 0.175 seconds, Fetched: 2 row(s)
  </code></pre>
  
  <p>In the above query,if i remove the position equals condition ( reportee_occupation_pos&lt;=>reportee_salary_pos),the result will be cartesian.</p>
  
  <p>The expected output is </p>
  
  <pre><code>101,richie,36,abc,SE,5000
  101,tom,28,xyz,JSE,3000
  101,jack,29,NULL,SE
  </code></pre>
  
  <p>The output got from the below query </p>
  
  <pre><code>select supervisorid,reportee_name_val,reportee_age_val,reportee_address_val,reportee_occupation_val,reportee_salary_val from manager lateral view posexplode(reportee_name)reportee_name  as reportee_name_pos,reportee_name_val lateral view posexplode(reportee_age)reportee_age as reportee_age_pos,reportee_age_val lateral view posexplode (reportee_address)reportee_address as reportee_address_pos,reportee_address_val lateral view posexplode (reportee_occupation)reportee_occupation as reportee_occupation_pos,reportee_occupation_val lateral view posexplode(reportee_salary)reportee_salary as reportee_salary_pos,reportee_salary_val where reportee_name_pos&lt;=&gt;reportee_age_pos and reportee_age_pos&lt;=&gt;reportee_address_pos and reportee_address_pos&lt;=&gt;reportee_occupation_pos and reportee_occupation_pos&lt;=&gt;reportee_salary_pos;
  
  
  101,richie,36,abc,SE,5000
  101,tom,28,xyz,JSE,3000
  </code></pre>
  
  <p>I am expecting all the elements of each array and if any array has lesser no of elements it should come as NULL in the lateral view</p>
  
  <p>Any Help would be appreciated</p>