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(SchemaPath.getSimplePath("key1"), IntVector.class);
BigIntVector key2 = exec.getValueVectorById(SchemaPath.getSimplePath("key2"), BigIntVector.class);
BigIntVector cnt = exec.getValueVectorById(SchemaPath.getSimplePath("cnt"), BigIntVector.class);
BigIntVector total = exec.getValueVectorById(SchemaPath.getSimplePath("total"), BigIntVector.class);
Integer[] 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((Long) cntArr[i], cnt.getAccessor().getObject(i));
assertEquals(keyArr1[i], key1.getAccessor().getObject(i));
assertEquals((Long) keyArr2[i], key2.getAccessor().getObject(i));
assertEquals((Long) totalArr[i], total.getAccessor().getObject(i));
}
}
if(exec.getContext().getFailureCause() != null){
throw exec.getContext().getFailureCause();