Saving all output to "!!{outputDirectory}!!/enforce_order.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/enforce_order.q >>> drop table table_asc; No rows affected >>> drop table table_desc; No rows affected >>> >>> set hive.enforce.sorting = true; No rows affected >>> >>> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS; No rows affected >>> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS; No rows affected >>> >>> insert overwrite table table_asc select key, value from src; 'key','value' No rows selected >>> insert overwrite table table_desc select key, value from src; 'key','value' No rows selected >>> >>> select * from table_asc limit 10; 'key','value' '0','val_0' '0','val_0' '0','val_0' '10','val_10' '100','val_100' '100','val_100' '103','val_103' '103','val_103' '104','val_104' '104','val_104' 10 rows selected >>> select * from table_desc limit 10; 'key','value' '98','val_98' '98','val_98' '97','val_97' '97','val_97' '96','val_96' '95','val_95' '95','val_95' '92','val_92' '90','val_90' '90','val_90' 10 rows selected >>> !record