@Override
    public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
      /**
       * ok - we are implementing a dummy byte int a = b1[s1] & 0xff; int b =
       * b2[s1] & 0xff; if(a!=b) return a -b;
       */
      return 0;
    }
Compare the buffers in serialized form.
ql/src/java/org/apache/hadoop/hive/ql/exec/ByteWritable.java