title: How to get first n elements in an array in Hive
body: <p>I use split function to create an array in Hive, how can I get the first n elements from the array, and I want to go through the sub-array</p>
  
  <p>code example</p>
  
  <pre><code>select col1 from table
  where split(col2, ',')[0:5] 
  </code></pre>
  
  <p>'[0:5]'looks likes python style, but it doesn't work here.</p>