public int compare(Integer o1, Integer o2) {
      byte[] key1 = keys[o1];
      byte[] key2 = keys[o2];
      int length1 = distKeyLengths[o1];
      int length2 = distKeyLengths[o2];
      return WritableComparator.compareBytes(key1, 0, length1, key2, 0, length2);
    }
For interaction between operator and top-n hash.
Currently only used to forward key/values stored in hash.
ql/src/java/org/apache/hadoop/hive/ql/exec/TopNHash.java