HIVE-6883 : Dynamic partitioning optimization does not honor sort order or order by (Prasanth J, reviewed by Vikram Dixit K)