use of org.voltdb.VoltTable in project voltdb by VoltDB.
the class TestUndoSuite method testMultibatchSPGoodThenMPFail.
public void testMultibatchSPGoodThenMPFail() throws IOException, ProcCallException {
final Client client = this.getClient();
doSpLoad(client, 100);
doMpRollback(client, 0);
doMpRollback(client, 1);
doMpRollback(client, 2);
VoltTable[] results = client.callProcedure("CountP1").getResults();
assertEquals(100, results[0].asScalarLong());
}
use of org.voltdb.VoltTable in project voltdb by VoltDB.
the class TestUnionSuite method testMultipleSetOperations5.
/**
* (A.I) except (B.I except C.I) except (D.I)
* @throws NoConnectionsException
* @throws IOException
* @throws ProcCallException
*/
public void testMultipleSetOperations5() throws NoConnectionsException, IOException, ProcCallException {
Client client = getClient();
VoltTable vt;
// in A and B and C, not in D. Eliminated by inner EXCEPT, so IN final result.
client.callProcedure("InsertA", 0, 0);
// in A and B, not in C and D. Eliminated by the first outer EXCEPT.
client.callProcedure("InsertA", 1, 1);
// in A and has no effect in C and not in D. IN final result set.
client.callProcedure("InsertA", 2, 2);
// in A and D. Eliminated by the second outer EXCEPT
client.callProcedure("InsertA", 3, 3);
// in A and B and C, not in D. Eliminated by inner EXCEPT, so IN final result.
client.callProcedure("InsertB", 0, 0);
// in A and B, not in C and D. Eliminated by the first outer EXCEPT.
client.callProcedure("InsertB", 1, 1);
// Not in A. Has no effect in B and C. Not in final result.
client.callProcedure("InsertB", 4, 4);
// Not in A. Has no effect in B. Not in final result.
client.callProcedure("InsertB", 5, 5);
// in A and B and C, not in D. Eliminated by inner EXCEPT, so IN final result.
client.callProcedure("InsertC", 0, 0);
// in A and has no effect in C and D. IN final result set.
client.callProcedure("InsertC", 2, 2);
// Not in A. Has no effect in B and C. Not in final result.
client.callProcedure("InsertC", 4, 4);
// Not in A. Has no effect in C. Not in final result.
client.callProcedure("InsertC", 6, 6);
// in A and D only. Eliminated by the second outer EXCEPT.
client.callProcedure("InsertD", 1, 3);
vt = client.callProcedure("@AdHoc", "(SELECT I FROM A) EXCEPT (SELECT I FROM B EXCEPT SELECT I FROM C) " + "EXCEPT SELECT I FROM D order by i;").getResults()[0];
assertEquals(2, vt.getRowCount());
validateTableOfScalarLongs(vt, new long[] { 0, 2 });
}
use of org.voltdb.VoltTable in project voltdb by VoltDB.
the class TestUnionSuite method testMultipleSetOperations3.
/**
* A.I intersect all (B.I except all C.I)
* @throws NoConnectionsException
* @throws IOException
* @throws ProcCallException
*/
public void testMultipleSetOperations3() throws NoConnectionsException, IOException, ProcCallException {
Client client = this.getClient();
VoltTable vt;
// in A but not in B-C. Eliminated by final INTERSECT
client.callProcedure("InsertA", 0, 0);
// in A but not in B-C. Eliminated by final INTERSECT
client.callProcedure("InsertA", 1, 1);
// in A but not in B-C. Eliminated by final INTERSECT
client.callProcedure("InsertA", 2, 1);
// in A and in B-C. In final result set
client.callProcedure("InsertA", 3, 2);
// in A and in B-C. In final result set
client.callProcedure("InsertA", 4, 2);
// in A but not in B-C. Eliminated by final INTERSECT
client.callProcedure("InsertA", 5, 2);
// in B and C. Eliminated by B-C
client.callProcedure("InsertB", 1, 0);
// in B and C. Eliminated by B-C
client.callProcedure("InsertB", 2, 1);
// in B-C and in A. In final result set
client.callProcedure("InsertB", 3, 2);
// in B-C and in A. In final result set
client.callProcedure("InsertB", 4, 2);
// in B and C. Eliminated by B-C
client.callProcedure("InsertC", 1, 1);
// in B and C. Eliminated by B-C
client.callProcedure("InsertC", 3, 0);
// not in B. Eliminated by B-C
client.callProcedure("InsertC", 4, 3);
vt = client.callProcedure("@AdHoc", "SELECT I FROM A INTERSECT ALL " + "(SELECT I FROM B EXCEPT ALL SELECT I FROM C);").getResults()[0];
assertEquals(2, vt.getRowCount());
validateTableOfScalarLongs(vt, new long[] { 2, 2 });
}
use of org.voltdb.VoltTable in project voltdb by VoltDB.
the class TestSystemProcedureSuite method testUpdateLogging.
public void testUpdateLogging() throws Exception {
Client client = getClient();
VoltTable[] results = null;
results = client.callProcedure("@UpdateLogging", m_loggingConfig).getResults();
for (VoltTable result : results) {
assertEquals(0, result.asScalarLong());
}
}
use of org.voltdb.VoltTable in project voltdb by VoltDB.
the class TestSystemCatalogSuite method testProceduresSelector.
public void testProceduresSelector() throws IOException, ProcCallException {
Client client = getClient();
VoltTable[] results = client.callProcedure("@SystemCatalog", "PROCEDURES").getResults();
assertEquals(9, results[0].getColumnCount());
System.out.println(results[0]);
}
Aggregations