* from V group by V.V_D1_PKEY
* @throws InterruptedException
*/
public void testDistributedSumAndGroup() throws NoConnectionsException,
ProcCallException, IOException, InterruptedException {
VoltTable vt;
Client client = getClient();
loadF(client, 0);
// FIXME String qs = "select V.V_D1_PKEY, sum(V.SUM_V1), sum(V.SUM_V2), sum(V.SUM_V3) "
// + "from V group by V.V_D1_PKEY";
String qs = "select V.V_D1_PKEY, sum(V.SUM_V1), sum(V.SUM_V2) "
+ "from V group by V.V_D1_PKEY";
vt = client.callProcedure("@AdHoc", qs).getResults()[0];
System.out.println("testDistributedSumAndJoin result: " + vt);
assert (vt.getRowCount() == 10); // 10 unique values for dim1 which is
// the grouping col
int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
while (vt.advanceRow()) {
Integer d1 = (Integer) vt.get(0, VoltType.INTEGER);
Integer s1 = (Integer) vt.get(1, VoltType.INTEGER);
Integer s2 = (Integer) vt.get(2, VoltType.INTEGER);
// FIXME Integer s3 = (Integer) vt.get(3, VoltType.INTEGER);
// track that 10 dim1s are in the final group
found[d1.intValue()] += 1;
// sum1 is const 2. 100 dim1 instances / group