private void testFetchDeletedRows() throws Exception {
    List<OrcInputFormat.SplitStrategy<?>> splitStrategies = getSplitStrategies();
    List<OrcSplit> splits = ((OrcInputFormat.ACIDSplitStrategy) splitStrategies.get(0)).getSplits();

    // Mark one of the transactions as an exception to test that invalid transactions
    // are being handled properly.
    conf.set(ValidWriteIdList.VALID_WRITEIDS_KEY, "tbl:14:1:1:5"); // Exclude transaction 5

    // enable fetching deleted rows
    conf.set(Constants.ACID_FETCH_DELETED_ROWS, "true");

    // Project ROW__IS__DELETED
    VectorizedRowBatchCtx rbCtx = new VectorizedRowBatchCtx(
            new String[] { "payload", VirtualColumn.ROWISDELETED.getName() },
            new TypeInfo[] { TypeInfoFactory.longTypeInfo, VirtualColumn.ROWISDELETED.getTypeInfo() },
            new DataTypePhysicalVariation[] { DataTypePhysicalVariation.NONE, DataTypePhysicalVariation.NONE },
            new int[] { 0 }, 0, 1,
            new VirtualColumn[] { VirtualColumn.ROWISDELETED },
            new String[0],
            new DataTypePhysicalVariation[] { DataTypePhysicalVariation.NONE, DataTypePhysicalVariation.NONE });
    VectorizedOrcAcidRowBatchReader vectorizedReader =
            new VectorizedOrcAcidRowBatchReader(splits.get(0), conf, Reporter.NULL, rbCtx);
    VectorizedRowBatch vectorizedRowBatch = rbCtx.createVectorizedRowBatch();
    vectorizedRowBatch.setPartitionInfo(1, 0); // set data column count as 1.
    long previousPayload = Long.MIN_VALUE;
    while (vectorizedReader.next(null, vectorizedRowBatch)) {
      LongColumnVector col = (LongColumnVector) vectorizedRowBatch.cols[0];
      LongColumnVector rowIsDeletedColumnVector = (LongColumnVector) vectorizedRowBatch.cols[1];
      for (int i = 0; i < vectorizedRowBatch.size; ++i) {
        int idx = vectorizedRowBatch.selected[i];
        long payload = col.vector[idx];
        long owid = (payload / NUM_ROWID_PER_OWID) + 1;
        long rowId = payload % NUM_ROWID_PER_OWID;
        if (rowId % 2 == 0 || rowId % 3 == 0) {
          assertEquals(1, rowIsDeletedColumnVector.vector[idx]);
        } else {
          assertEquals(0, rowIsDeletedColumnVector.vector[idx]);
        }
        assertTrue(owid != 5); // Check that writeid#5 has been excluded.
        assertTrue(payload >= previousPayload); // Check that the data is in sorted order.
        previousPayload = payload;
      }
    }
  }
Tests that we can figure out min/max ROW__ID for each split and then use
that to only load delete events between min/max.
This test doesn't actually check what is read - that is done more E2E
unit tests.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java