Examples of advanceRow()


Examples of org.voltdb.VoltTable.advanceRow()

   
    @Test
    public void testEvictTuples() throws Exception {
        this.loadData();
        VoltTable evictResult = this.evictData();
    evictResult.advanceRow();

        // Our stats should now come back with at least one block evicted
        VoltTable results[] = this.ee.getStats(SysProcSelector.TABLE, this.locators, false, 0L);
        assertEquals(1, results.length);
        System.err.println("-------------------------------");
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

            System.err.println(VoltTableUtil.format(evictResult));
            assertNotNull(evictResult);
            assertEquals(1, evictResult.getRowCount());
            assertNotSame(results[0].getColumnCount(), evictResult.getColumnCount());
            evictResult.resetRowPosition();
            boolean adv = evictResult.advanceRow();
            assertTrue(adv);
        } // FOR
    }

    @Test
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

            table = ts.getMapOutputByPartition(partition);

            assert (table != null) : String.format("Missing MapOutput table for txn #%d", ts.getTransactionId());

            while (table.advanceRow()) {
                int rowPartition = -1;
                try {
                    rowPartition = p_estimator.getTableRowPartition(ts.getMapEmit(), table);
                } catch (Exception e) {
                    LOG.fatal("Failed to split input table into partitions", e);
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        assertTrue(vt.getRowCount() == 11);

        // Selecting A1 - should get values 1 through 11
        // once each. These results aren't necessarily ordered.
        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertTrue(A1 <= 11);
            assertTrue(A1 > 0);
            found[A1.intValue()] += 1;
        }
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        // Selecting count(A1) - should get two counts of 1 and one count each
        // of 2-10: (1, 1, 2, 3, 4, .. 10).
        // These results aren't necessarily ordered
        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertTrue(A1 <= 10);
            assertTrue(A1 > 0);
            found[A1.intValue()] += 1;
        }
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testSelectSumAGroupbyA result: " + vt);
        assertEquals(11, vt.getRowCount());

        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        while (vt.advanceRow()) {
            Integer a1 = (Integer) vt.get(0, VoltType.INTEGER);
            Integer sum = (Integer) vt.get(1, VoltType.INTEGER);
            found[a1.intValue()] += 1;
            // A1 = 11 is a special case
            if (a1.intValue() == 11)
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        vt = client
        .callProcedure("@AdHoc", "select count(distinct A1) from T1").getResults()[0];
        assertTrue(vt.getRowCount() == 1);

        // there are 11 distinct values for A1
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertEquals(11, A1.intValue());
        }
    }
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        loaderNxN(client, 0);
        vt = client.callProcedure("@AdHoc", "select count(A1) from T1").getResults()[0];
        assertTrue(vt.getRowCount() == 1);

        // there are 56 rows in the table 1 + 2 + 3 + .. + 10 + 1
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
            System.out.println("select count = " + A1.intValue());
            assertEquals(56, A1.intValue());
        }
    }
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        System.out.println("testSelectDistinctA result row("
                + vt.getColumnName(0) + ") " + vt);

        // valid result is the set {1,2,...,11}
        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
            System.out.println("\tdistinct value: " + A1.intValue());
            assertEquals("A1", vt.getColumnName(0));
            assertTrue(A1 <= 11);
            assertTrue(A1 > 0);
View Full Code Here

Examples of org.voltdb.VoltTable.advanceRow()

        String qs = "select sum(F_VAL1), sum(F_VAL2), sum(F_VAL3) from F";

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testDistributedSum result: " + vt);
        assertTrue(vt.getRowCount() == 1);
        while (vt.advanceRow()) {
            Integer sum1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertEquals(2000, sum1.intValue());
            Integer sum2 = (Integer) vt.get(1, VoltType.INTEGER);
            assertEquals(4995000, sum2.intValue());
            Integer sum3 = (Integer) vt.get(2, VoltType.INTEGER);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.