title: Hive query CREATE TABLE WITH ORDER BY COLUMN stuck at 83%
body: <p>CREATE TABLE ordered_table</p>
  
  <p>AS
  SELECT name, epoc_time 
  FROM reference_table</p>
  
  <p>order by name, cast(epoc_time as bigint)</p>
  
  <p>My reference_table has 1000000000 records. </p>
  
  <p>This query works on smaller table but fails on this table at 83% with alerts on YARN and spark as below:</p>
  
  <p><a href="https://i.stack.imgur.com/OAR32.png" rel="nofollow noreferrer">Yarn alert</a></p>
  
  <p><a href="https://i.stack.imgur.com/L684a.png" rel="nofollow noreferrer">Spark Thrift alert</a></p>