@Test
  public void testVectorFilterHasSelectedSmallerThanBatchDoNotThrowException() throws HiveException {

    VectorFilterOperator vfo = getAVectorFilterOperator();

    FakeDataReader fdr = new FakeDataReader(1024*1, 3, FakeDataSampleType.OrderedSequence);

    prepareVectorFilterOperation(vfo);

    VectorizedRowBatch vrg = fdr.getNext();

    vrg.selected = new int[] { 1, 2, 3, 4};

    Assertions.assertDoesNotThrow(() -> vfo.process(vrg, 0));
  }
Test cases for vectorized filter operator.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorFilterOperator.java