@Override
        public int compare(Order o1, Order o2) {
          if (o1.getOrder() < o2.getOrder()) {
            return -1;
          } else {
            if (o1.getOrder() == o2.getOrder()) {
              return 0;
            } else {
              return 1;
            }
          }
        }
Helper method to set location properly in partSpec
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java