Package org.voltdb

Examples of org.voltdb.VoltTableRow.wasNull()


                    assertEquals(0, results[0].asScalarLong());
                } else {
                    final VoltTableRow row = results[0].fetchRow(0);
                    row.get(0, results[0].getColumnType(0));
                    if (!isHSQL()) {
                        assertTrue(row.wasNull());
                    }
                }
            }
            // Do avg separately since the column is a float and makes
            // asScalarLong() unhappy
View Full Code Here


                final VoltTable[] result = client.callProcedure("Select", "ALLOW_NULLS", pkey.get()).getResults();
                final VoltTableRow row = result[0].fetchRow(0);
                for (int i=0; i < COLS; ++i) {
                    final Object obj = row.get(i+1, m_types[i]);
                    if (i == k) {
                        assertTrue(row.wasNull());
                        System.out.println("Row " + i + " verifed as NULL");
                    }
                    else {
                        assertTrue( comparisonHelper(obj, params[i+2], m_types[i]) );
                    }
View Full Code Here

            final VoltTable[] result = client.callProcedure("Select", "ALLOW_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i=0; i < COLS; ++i) {
                final Object obj = row.get(i+1, m_types[i]);
                if (i == k) {
                    assertTrue(row.wasNull());
                }
                else {
                    assertTrue( comparisonHelper(obj, params[i+2], m_types[i]) );
                }
            }
View Full Code Here

            // verify that the row was updated
            final VoltTable[] result = client.callProcedure("Select", "NO_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i=0; i < COLS; ++i) {
                final Object obj = row.get(i+1, m_types[i]);
                assertTrue (!row.wasNull());
                assertTrue( comparisonHelper(obj, params[i+2], m_types[i]) );
            }
        }
    }
View Full Code Here

            client.callProcedure("Insert", params);
            final VoltTable[] result = client.callProcedure("Select", "NO_NULLS", pkey.get()).getResults();
            final VoltTableRow row = result[0].fetchRow(0);
            for (int i=0; i < COLS; ++i) {
                final Object obj = row.get(i+1, m_types[i]);
                assertTrue (!row.wasNull());
                assertTrue( comparisonHelper(obj, params[i+2], m_types[i]) );
            }
        }
    }
View Full Code Here

            assert otherresults[resultoffset + 0].getRowCount() == 1;
            assert otherresults[resultoffset + 1].getRowCount() == 1;
            final long c_id = (otherresults[resultoffset + 0].asScalarLong());
            final VoltTableRow row = otherresults[resultoffset + 1].fetchRow(0);
            final double ol_total = row.getDouble(0);
            final boolean ol_total_wasnull = row.wasNull();

            // If there are no order lines, SUM returns null. There should always be order lines.
            if (ol_total_wasnull) {
                throw new VoltAbortException(
                        "ol_total is NULL: there are no order lines. This should not happen");
View Full Code Here

            assert otherresults[resultoffset + 0].getRowCount() == 1;
            assert otherresults[resultoffset + 1].getRowCount() == 1;
            final long c_id = (otherresults[resultoffset + 0].asScalarLong());
            final VoltTableRow row = otherresults[resultoffset + 1].fetchRow(0);
            final double ol_total = row.getDouble(0);
            final boolean ol_total_wasnull = row.wasNull();

            // If there are no order lines, SUM returns null. There should always be order lines.
            /* FIXME
            if (ol_total_wasnull) {
                throw new VoltAbortException(
View Full Code Here

            assert otherresults[resultoffset + 0].getRowCount() == 1;
            assert otherresults[resultoffset + 1].getRowCount() == 1;
            final long c_id = (otherresults[resultoffset + 0].asScalarLong());
            final VoltTableRow row = otherresults[resultoffset + 1].fetchRow(0);
            final double ol_total = row.getDouble(0);
            final boolean ol_total_wasnull = row.wasNull();

            // If there are no order lines, SUM returns null. There should always be order lines.
            if (ol_total_wasnull) {
                throw new VoltAbortException(
                        "ol_total is NULL: there are no order lines. This should not happen");
View Full Code Here

            assert otherresults[resultoffset + 0].getRowCount() == 1;
            assert otherresults[resultoffset + 1].getRowCount() == 1;
            final long c_id = (otherresults[resultoffset + 0].asScalarLong());
            final VoltTableRow row = otherresults[resultoffset + 1].fetchRow(0);
            final double ol_total = row.getDouble(0);
            final boolean ol_total_wasnull = row.wasNull();

            // If there are no order lines, SUM returns null. There should always be order lines.
            if (ol_total_wasnull) {
                throw new VoltAbortException(
                        "ol_total is NULL: there are no order lines. This should not happen");
View Full Code Here

                        "ALLOW_NULLS", pkey.get()).getResults();
                final VoltTableRow row = result[0].fetchRow(0);
                for (int i = 0; i < COLS; ++i) {
                    final Object obj = row.get(i + 1, m_types[i]);
                    if (i == k) {
                        assertTrue(row.wasNull());
                        System.out.println("Row " + i + " verifed as NULL");
                    } else {
                        assertTrue(comparisonHelper(obj, params[i + 2],
                                m_types[i]));
                    }
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.