title: How to get first not null element from ARRAY<string> in hive 2.2.0
body: <p>I have a hive SQL as below which returns the following output, now I want to get the first not null value from array i.e. "11".</p>
  
  <p>SQ:: </p>
  
  <blockquote>
    <p>select cod_cust, split(reverse(concat_ws('',collect_list(case when
    acc_status='Dormant' then "1" else "0" end))),'0') status from
    account_status group by cod_cust;</p>
  </blockquote>
  
  <p>Output::</p>
  
  <blockquote>
    <p>cod_cust  status</p>
    
    <p>1023  ["","11","1","111","",""]</p>
    
    <p>2209  ["","11","1","111","",""]</p>
  </blockquote>