title: LATERAL VIEW explode funtion in hive
body: <p>I am trying to export data from excel into a hive table, while doing so, i have a column 'ABC' which has values like '1,2,3'.
  I used the lateral view explode function but it does not does anything to my data.</p>
  <p>Following is my code snippet :
  CREATE TABLE table_name
  (
  id  string,
  brand   string,
  data_name   string,
  name    string,
  address string,
  country string,
  flag    string,
  sample_list array  )
  ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'<br />
  STORED AS TEXTFILE<br />
  ;<br />
  LOAD DATA LOCAL INPATH 'location' INTO TABLE
  table_name ;</p>
  <p><em><strong>output sample:</strong></em></p>
  <h1>id  brand   data_name   name    address  country    flag    sample_list</h1>
  <p>19  1   ABC     SQL         ABC     Cornstarch  IN       1      [&quot;[1,2,3]&quot;]</p>
  <p><em><strong>then i do:</strong></em>
  select *  from franchise_unsupress LATERAL VIEW explode(SEslist) SEslist as final_SE;</p>
  <p><em><strong>output sample:</strong></em></p>
  <h1>id  brand   data_name   name    address  country    flag    sample_list</h1>
  <p>19  1   ABC     SQL         ABC     Cornstarch  IN       1      [1,2,3]</p>
  <p><em><strong>I also tried:</strong></em>
  select *  from franchise_unsupress lateral view explode(split(SEslist,',')) SEslist AS final_SE ;
  <em><strong>but got an error:</strong></em></p>
  <p>FAILED: ClassCastException org.apache.hadoop.hive.serde2.objectinspector.StandardListObjectInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector</p>
  <p><em><strong>whereas, what i need is:</strong></em></p>
  <h1>id  brand   data_name   name    address  country    flag    sample_list</h1>
  <p>19  1   ABC     SQL         ABC     Cornstarch  IN       1      1
  19  1   ABC     SQL         ABC     Cornstarch  IN       1      2
  19  1   ABC     SQL         ABC     Cornstarch  IN       1      3</p>
  <p>Any help will be greatly appreciated! thank you</p>