HIVE-6883 : Dynamic partitioning optimization does not honor sort order or order by (Prasanth J, reviewed by Vikram Dixit K)
(from https://issues.apache.org/jira/secure/attachment/12643461/HIVE-6883-branch-0.13.3.patch)

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/branch-0.13@1593448 13f79535-47bb-0310-9956-ffa450edef68