private void testDeleteEventFiltering3() throws Exception {
    boolean filterOn =
        HiveConf.getBoolVar(conf, HiveConf.ConfVars.FILTER_DELETE_EVENTS);
    boolean columnStatsPresent = OrcConf.ROW_INDEX_STRIDE.getLong(conf) != 0;

    // To create small stripes
    OrcConf.STRIPE_SIZE.setLong(conf, 1);
    // Need to use a bigger row than DummyRow for the writer to flush the stripes
    conf.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS, BigRow.getColumnNamesProperty());
    conf.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES, BigRow.getColumnTypesProperty());

    // Use OrcRecordUpdater.OrcOptions to set the batch size.
    OrcRecordUpdater.OrcOptions orcOptions = new OrcRecordUpdater.OrcOptions(conf);
    orcOptions.orcOptions(OrcFile.writerOptions(conf).batchSize(1));

    int bucket = 1;

    AcidOutputFormat.Options options = orcOptions.filesystem(fs)
        .bucket(bucket)
        .writingBase(true)
        .minimumWriteId(10000002)
        .maximumWriteId(10000002)
        .inspector(bigRowInspector)
        .reporter(Reporter.NULL)
        .recordIdColumn(1)
        .finalDestination(root);

    int bucketProperty = BucketCodec.V1.encode(options);

    // Create 3 stripes with 1 row each
    byte[] data = new byte[1000];
    RecordUpdater updater = new OrcRecordUpdater(root, options);
    updater.insert(10000002, new BigRow(data, 0, 0, bucket));
    updater.insert(10000002, new BigRow(data, 1, 0, bucket));
    updater.insert(10000002, new BigRow(data, 2, 0, bucket));
    updater.close(false);

    String acidFile = "base_10000002/bucket_00001";
    Path acidFilePath = new Path(root, acidFile);

    Reader reader = OrcFile.createReader(acidFilePath, OrcFile.readerOptions(conf));

    List<StripeInformation> stripes = reader.getStripes();

    // Make sure 3 stripes are created
    assertEquals(3, stripes.size());

    long fileLength = fs.getFileStatus(acidFilePath).getLen();

    // 1. Splits within a stripe
    // A split that's completely within the 2nd stripe
    StripeInformation stripe = stripes.get(1);
    OrcSplit split = new OrcSplit(acidFilePath, null,
        stripe.getOffset() + 50,
        stripe.getLength() - 100,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    validateKeyInterval(split, new RecordIdentifier(1, 1, 1),
        new RecordIdentifier(0, 0, 0), filterOn);

    // A split that's completely within the last stripe
    stripe = stripes.get(2);
    split = new OrcSplit(acidFilePath, null,
        stripe.getOffset() + 50,
        stripe.getLength() - 100,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    validateKeyInterval(split, new RecordIdentifier(1, 1, 1),
        new RecordIdentifier(0, 0, 0), filterOn);

    // 2. Splits starting at a stripe boundary
    // A split that starts where the 1st stripe starts and ends before the 1st stripe ends
    stripe = stripes.get(0);
    split = new OrcSplit(acidFilePath, null,
        stripe.getOffset(),
        stripe.getLength() - 50,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    // The key interval for the 1st stripe
    if (columnStatsPresent) {
      validateKeyInterval(split, new RecordIdentifier(10000002, bucketProperty, 0),
          new RecordIdentifier(10000002, bucketProperty, 0), filterOn);
    } else {
      validateKeyInterval(split, null, new RecordIdentifier(10000002, bucketProperty, 0), filterOn);
    }

    // A split that starts where the 2nd stripe starts and ends after the 2nd stripe ends
    stripe = stripes.get(1);
    split = new OrcSplit(acidFilePath, null,
        stripe.getOffset(),
        stripe.getLength() + 50,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    // The key interval for the last 2 stripes
    validateKeyInterval(split, new RecordIdentifier(10000002, bucketProperty, 1),
        new RecordIdentifier(10000002, bucketProperty, 2), filterOn);

    // 3. Splits ending at a stripe boundary
    // A split that starts before the last stripe starts and ends at the last stripe boundary
    stripe = stripes.get(2);
    split = new OrcSplit(acidFilePath, null,
        stripe.getOffset() - 50,
        stripe.getLength() + 50,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    // The key interval for the last stripe
    validateKeyInterval(split, new RecordIdentifier(10000002, bucketProperty, 2),
        new RecordIdentifier(10000002, bucketProperty, 2), filterOn);

    // A split that starts after the 1st stripe starts and ends where the last stripe ends
    split = new OrcSplit(acidFilePath, null,
        stripes.get(0).getOffset() + 50,
        reader.getContentLength() - 50,
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    // The key interval for the last 2 stripes
    validateKeyInterval(split, new RecordIdentifier(10000002, bucketProperty, 1),
        new RecordIdentifier(10000002, bucketProperty, 2), filterOn);

    // A split that starts where the 1st stripe starts and ends where the last stripe ends
    split = new OrcSplit(acidFilePath, null,
        stripes.get(0).getOffset(),
        reader.getContentLength(),
        new String[] {"localhost"}, null, false, true, getDeltaMetaDataWithBucketFile(1),
        fileLength, fileLength, root, null);

    // The key interval for all 3 stripes
    if (columnStatsPresent) {
      validateKeyInterval(split, new RecordIdentifier(10000002, bucketProperty, 0),
          new RecordIdentifier(10000002, bucketProperty, 2), filterOn);
    } else {
      validateKeyInterval(split, null, new RecordIdentifier(10000002, bucketProperty, 2), filterOn);
    }
  }
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