title: Hive splits ORC files on small parts
body: <pre><code>create table n_data(MARKET string,CATEGORY string,D map&lt;string,string&gt;,monthid int,value  DOUBLE)
    STORED AS ORC
   ;
  </code></pre>
  
  <p>I load data into it (over 45000000 rows), look at hive warehouse</p>
  
  <p><img src="https://i.stack.imgur.com/cn75t.jpg" alt="enter image description here"></p>
  
  <p>Result table consists of 5 files with 10MB-20MB size, but <strong>dfs.block.size</strong> sets to 128MB, it's not optimal to store small files, because it uses whole block!</p>
  
  <p>How to setup HIVE split files by 128 MB?</p>
  
  <p><strong>EDIT</strong>
  insert query:</p>
  
  <pre><code>insert into n_data
  select tmp.market,tmp.category,d,adTable.monthid,tmp.factperiod[adTable.monthid] as fact 
  from (select market,category,d,factperiod,map_keys(factperiod) as month_arr  from n_src where market is not null) as tmp 
  LATERAL VIEW explode(month_arr) adTable AS monthid
  </code></pre>