@Test public void () { Random rand = new Random(SEED); inputColumnVector1 = VectorizedRowGroupGenUtil.generate(, , BATCH_SIZE, rand); inputColumnVector2 = VectorizedRowGroupGenUtil.generate(, , BATCH_SIZE, rand); VectorizedRowBatch rowBatch = new VectorizedRowBatch(2, BATCH_SIZE); rowBatch.cols[0] = inputColumnVector1; rowBatch.cols[1] = inputColumnVector2; vectorExpression = new (0, 1); vectorExpression.evaluate(rowBatch); int selectedIndex = 0; for(int i = 0; i < BATCH_SIZE; i++) { //null vector is safe to check, as it is always initialized to match the data vector if(!inputColumnVector1.isNull[i] && !inputColumnVector2.isNull[i]) { if(inputColumnVector1.vector[i] inputColumnVector2.vector[i]) { assertEquals( "Vector index that passes filter " + inputColumnVector1.vector[i] + "" + inputColumnVector2.vector[i] + " 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); } }