title: Use inline(ARRAY<STRUCT[,STRUCT]>) in Hive
body: <p>Has someone been able to use that function before, I have tried pretty much every combination in order to see if it works.</p>
  
  <p>This is the Array of Struct I am trying to use with inline</p>
  
  <pre><code>[{"position":1,"price":124.0,"card_pos":"External","clicked":0},
   {"position":2,"price":94.78,"card_pos":"Cbox","clicked":0},
   {"position":3,"price":94.77,"card_pos":"External","clicked":0}] 
  </code></pre>
  
  <p>This works nicely:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select iq.*, iq.card.position as position, 
  iq.card.price as price,iq.card.card_pos as card_pos, 
  iq.card.clicked as clicked 
  from
  (
    select *
    from 
    hsim.im_metasearch
    LATERAL VIEW explode(cards) card as card
  ) iq
  </code></pre>
  
  <p>It's kind of annoying that I can's make the inline function work.
  The documentation on the Hive Wiki is very vague on how this function should be used properly.</p>
  
  <p>We have Hive 0.10(CDH4.6), the inline function is definitely part of our distribution.</p>
  
  <p>If someone as concrete example of how to use it please let me know</p>
  
  <p>I have tried a couple of different syntax</p>
  
  <pre class="lang-sql prettyprint-override"><code>select *
  from 
  hsim.im_metasearch
  Lateral view inline(cards) as(position,price,card_pos,clicked)
  
  select *
  from 
  hsim.im_metasearch
  Lateral view inline(cards) card as (position,price,card_pos,clicked)
  </code></pre>
  
  <p>I've also tried to put it in the select without success
  Thank you</p>