public void twoKeyAgg(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable{
SimpleRootExec exec = doTest(bitContext, connection, "/agg/twokey.json");
while(exec.next()){
IntVector key1 = exec.getValueVectorById(new SchemaPath("key1", ExpressionPosition.UNKNOWN), IntVector.class);
BigIntVector key2 = exec.getValueVectorById(new SchemaPath("key2", ExpressionPosition.UNKNOWN), BigIntVector.class);
BigIntVector cnt = exec.getValueVectorById(new SchemaPath("cnt", ExpressionPosition.UNKNOWN), BigIntVector.class);
BigIntVector total = exec.getValueVectorById(new SchemaPath("total", ExpressionPosition.UNKNOWN), BigIntVector.class);
int[] keyArr1 = {Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE};
long[] keyArr2 = {0,1,2,0,1,2};
long[] cntArr = {34,34,34,34,34,34};
long[] totalArr = {0,34,68,0,34,68};
for(int i =0; i < exec.getRecordCount(); i++){
// System.out.print(key1.getAccessor().getObject(i));
// System.out.print("\t");
// System.out.print(key2.getAccessor().getObject(i));
// System.out.print("\t");
// System.out.print(cnt.getAccessor().getObject(i));
// System.out.print("\t");
// System.out.print(total.getAccessor().getObject(i));
// System.out.println();
assertEquals(cntArr[i], cnt.getAccessor().getObject(i));
assertEquals(keyArr1[i], key1.getAccessor().getObject(i));
assertEquals(keyArr2[i], key2.getAccessor().getObject(i));
assertEquals(totalArr[i], total.getAccessor().getObject(i));
}
}
if(exec.getContext().getFailureCause() != null){
throw exec.getContext().getFailureCause();