if (b.getData() != null) {
int rows = b.getHeader().getRowCount();
count += rows;
RecordBatchLoader loader = new RecordBatchLoader(new BootStrapContext(DrillConfig.create()).getAllocator());
loader.load(b.getHeader().getDef(), b.getData());
BigIntVector vv1 = (BigIntVector)loader.getValueAccessorById(BigIntVector.class, loader.getValueVectorId(
new SchemaPath("col1", ExpressionPosition.UNKNOWN)).getFieldIds()).getValueVector();
Float8Vector vv2 = (Float8Vector)loader.getValueAccessorById(Float8Vector.class, loader.getValueVectorId(
new SchemaPath("col2", ExpressionPosition.UNKNOWN)).getFieldIds()).getValueVector();
IntVector pVector = (IntVector)loader.getValueAccessorById(IntVector.class, loader.getValueVectorId(
new SchemaPath("partition", ExpressionPosition.UNKNOWN)).getFieldIds()).getValueVector();
long previous1 = Long.MIN_VALUE;
double previous2 = Double.MIN_VALUE;
int partPrevious = -1;
long current1 = Long.MIN_VALUE;
double current2 = Double.MIN_VALUE;
int partCurrent = -1;
int partitionRecordCount = 0;
for (int i = 0; i < rows; i++) {
previous1 = current1;
previous2 = current2;
partPrevious = partCurrent;
current1 = vv1.getAccessor().get(i);
current2 = vv2.getAccessor().get(i);
partCurrent = pVector.getAccessor().get(i);
Assert.assertTrue(current1 >= previous1);
if (current1 == previous1) {
Assert.assertTrue(current2 <= previous2);