@Test public void () { Random rand = new Random(SEED); inputColumnVector = VectorizedRowGroupGenUtil.generate(, , BATCH_SIZE, rand); VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); rowBatch.cols[0] = inputColumnVector; scalarValue = 0; do { scalarValue = rand.next(); } while(scalarValue == 0); vectorExpression = new (); vectorExpression.evaluate(rowBatch); int selectedIndex = 0; int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = !inputColumnVector.isNull[i] && ? BATCH_SIZE : 0; } else { for(i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if( ) { assertEquals( "Vector index that passes filter " + + "" + + " is not in rowBatch selected index", i, rowBatch.selected[selectedIndex]); selectedIndex++; } } } } assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, selectedIndex, rowBatch.size); if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { assertEquals( "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " + selectedIndex, true, rowBatch.selectedInUse); } else if(selectedIndex == BATCH_SIZE) { assertEquals( "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " + selectedIndex, false, rowBatch.selectedInUse); } }