public void append(BytesRefWritable data) throws IOException {
        data.writeDataTo(columnValBuffer);
        int currentLen = data.getLength();

        if (prevValueLength < 0) {
          startNewGroup(currentLen);
          return;
        }

        if (currentLen != prevValueLength) {
          flushGroup();
          startNewGroup(currentLen);
        } else {
          runLength++;
        }
      }
Write KeyBuffer/ValueBuffer pairs to a RCFile. RCFile's format is
compatible with SequenceFile's.
ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java