Package org.voltdb

Examples of org.voltdb.VoltTable.addRow()


            Object[] vals = map.get(key);
          
            VoltTable table = new VoltTable(new VoltTable.ColumnInfo(key, ProcedureUtil.getVoltType(vals[0])));

            for (Object v : vals) {
                table.addRow(v);
            }

            tables[i++] = table;
        }
View Full Code Here


        // Now create VoltTable and test that
        VoltTable vt = new VoltTable(new ColumnInfo[] {
            new ColumnInfo(catalog_col0.getName(), VoltType.get(catalog_col0.getType())),   // D_ID
            new ColumnInfo(catalog_col1.getName(), VoltType.get(catalog_col1.getType())),   // D_W_ID
        });
        vt.addRow(params[0], params[1]);
        VoltTableRow vt_row = vt.fetchRow(0);
        int vt_partition = p_estimator.getTableRowPartition(catalog_tbl, vt_row);
        assert(vt_partition >= 0) : "Invalid Partition: " + vt_partition;
        assertEquals(stmt_partition, vt_partition);
    }
View Full Code Here

                    row[j] = w_id;
                    expected.put(w_id, p_estimator.getHasher().hash(w_id));
                }
                else row[j] = VoltTypeUtil.getRandomValue(vtype);
            } // FOR
            vt.addRow(row);
        } // FOR
        assertEquals(num_rows, vt.getRowCount());
       
        vt.resetRowPosition();
        while (vt.advanceRow()) {
View Full Code Here

                    row[j] = name;
                    expected.put(name, p_estimator.getHasher().hash(name));
                }
                else row[j] = VoltTypeUtil.getRandomValue(vtype);
            } // FOR
            vt.addRow(row);
        } // FOR
        assertEquals(num_rows, vt.getRowCount());
       
        vt.resetRowPosition();
        while (vt.advanceRow()) {
View Full Code Here

        }

        VoltTable vtLoad = new VoltTable(new VoltTable.ColumnInfo("called_time_milliseconds",VoltType.BIGINT));
        Object row[] = new Object[1];
        row[0] = called_time_milliseconds;
        vtLoad.addRow(row);

        final VoltTable[] vtReturn = {vtLoad};

        return vtReturn;
    }
View Full Code Here

        }

        VoltTable vtMetric = new VoltTable(new VoltTable.ColumnInfo("called_time_milliseconds",VoltType.BIGINT));
        Object rowMetric[] = new Object[1];
        rowMetric[0] = called_time_milliseconds;
        vtMetric.addRow(rowMetric);

        final VoltTable[] vtReturn = {vtMoved,vtMetric};

        return vtReturn;
    }
View Full Code Here

        }

        VoltTable vtDeleted = new VoltTable(new VoltTable.ColumnInfo("rows_deleted",VoltType.INTEGER));
        Object row1[] = new Object[1];
        row1[0] = rowCount;
        vtDeleted.addRow(row1);

        VoltTable vtLoad = new VoltTable(new VoltTable.ColumnInfo("called_time_milliseconds",VoltType.BIGINT));
        Object row[] = new Object[1];
        row[0] = called_time_milliseconds;
        vtLoad.addRow(row);
View Full Code Here

        vtDeleted.addRow(row1);

        VoltTable vtLoad = new VoltTable(new VoltTable.ColumnInfo("called_time_milliseconds",VoltType.BIGINT));
        Object row[] = new Object[1];
        row[0] = called_time_milliseconds;
        vtLoad.addRow(row);

        final VoltTable[] vtReturn = {vtDeleted,vtLoad};

        return vtReturn;
    }
View Full Code Here

            }
            for (int j=0; j < 20; ++j) {
                row[col++] = number(0, 1<<30);
            }
            assert (col == customerTbl.getColumnCount());
            customerTbl.addRow(row);

            if (customerTbl.getRowCount() >= kCustomerBatchSize) {
                System.err.printf("CUSTOMERS: loading %d rows (cid %d of %d)\n",
                                  customerTbl.getRowCount(), cid, (kMaxCustomers / m_scalefactor));
                loadTable("CUSTOMERS", customerTbl);
View Full Code Here

            row[col++] = new Integer(fid++);
            for (int j=0; j < 30; ++j) {
                row[col++] = number(0, 1<<30);
            }
            assert (col == flightTbl.getColumnCount());
            flightTbl.addRow(row);

            if (flightTbl.getRowCount() >= kFlightBatchSize) {
                System.err.printf("FLIGHTS: loading %d rows (fid %d of %d)\n",
                                  flightTbl.getRowCount(), fid, (kMaxFlights / m_scalefactor));
                loadTable("FLIGHTS", flightTbl);
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.