private static OrcRawRecordMerger.KeyInterval getKeyInterval(ColumnStatistics[] colStats) {
    IntegerColumnStatistics origWriteId = (IntegerColumnStatistics) colStats[OrcRecordUpdater.ORIGINAL_WRITEID + 1];
    IntegerColumnStatistics bucketProperty = (IntegerColumnStatistics) colStats[OrcRecordUpdater.BUCKET + 1];
    IntegerColumnStatistics rowId = (IntegerColumnStatistics) colStats[OrcRecordUpdater.ROW_ID + 1];

    // We may want to change bucketProperty from int to long in the future(across the stack) this protects
    // the following cast to int
    assert bucketProperty.getMaximum() <= Integer.MAX_VALUE :
        "was bucketProperty (max) changed to a long (" + bucketProperty.getMaximum() + ")?!";
    assert bucketProperty.getMinimum() <= Integer.MAX_VALUE :
        "was bucketProperty (min) changed to a long (" + bucketProperty.getMaximum() + ")?!";
    RecordIdentifier maxKey = new RecordIdentifier(origWriteId.getMaximum(), (int) bucketProperty.getMaximum(), rowId.getMaximum());
    RecordIdentifier minKey = new RecordIdentifier(origWriteId.getMinimum(), (int) bucketProperty.getMinimum(), rowId.getMinimum());
    return new OrcRawRecordMerger.KeyInterval(minKey, maxKey);
  }
Calculates the min/max record key.
Structure in data is like this:
<op, owid, writerId, rowid, cwid, <f1, ... fn>>
The +1 is to account for the top level struct which has a
ColumnStatistics object in colsStats.  Top level struct is normally
dropped by the Reader (I guess because of orc.impl.SchemaEvolution)
@param colStats The statistics array
@return The min record key
ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java