title: How to split delimited String to multiple rows in Hive using lateral view explode
body: <p>I have a table in Hive as below - </p>
  
  <pre><code>create table somedf 
  (sellers string , 
   orders int 
  )
  
  insert into somedf values
  ('1--**--2--**--3',50),
  ('1--**--2', 10)
  </code></pre>
  
  <p>The table has a column called sellers and it is delimited by the characters described in the insert statement. I would like to split the sellers into multiple rows so that it looks like below - </p>
  
  <pre><code>exploded_sellers orders
  1                 50
  2                 50
  3                 50
  1                 10
  2                 10
  </code></pre>
  
  <p>I am trying to use <code>lateral view explode()</code> function in Hive but unable to get the results. I am using the below query - </p>
  
  <pre><code>select exploded_sellers, orders
  from somedf
  lateral view outer explode(split(sellers,'\\--*.*\\*.*--')) t1 as exploded_sellers
  </code></pre>
  
  <p>which gives me below results as output - </p>
  
  <pre><code>exploded_sellers orders
  1                 50
  3                 50
  1                 10
  2                 10
  </code></pre>
  
  <p>This result does not split Row 1<code>('1--**--2--**--3',50)</code> from the table as desired and ends up in producing only 2 rows instead of 3.</p>
  
  <p>Is there any other function that is needed for this task?
  Does <code>lateral view explode()</code> only work on arrays ?</p>