@Override
    public int compare(int[] row1, int[] row2) {
      assert row1 != null && row2 != null && row1.length == row2.length;
      for(int i = 0; i < row1.length; i++) {
        int comp = Integer.compare(row1[i], row2[i]);
        if(comp != 0) {
          return comp;
        }
      }
      return 0;
    }
takes raw data and turns it into a string as if from Driver.getResults()
sorts rows in dictionary order
ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java