Package org.voltdb

Examples of org.voltdb.VoltType


                        msg += "Partition column '" + tableName + "." + colName + "' is nullable. " +
                            "Partition columns must be constrained \"NOT NULL\".";
                        throw new VoltCompilerException(msg);
                    }
                    // verify that the partition column is a supported type
                    VoltType pcolType = VoltType.get((byte) partitionCol.getType());
                    switch (pcolType) {
                        case TINYINT:
                        case SMALLINT:
                        case INTEGER:
                        case BIGINT:
View Full Code Here


        if (inputTable.getColumnCount() != outputTableSchema.getColumns().size()) {
            return true;
        }
        for (int ii = 0; ii < inputTable.getColumnCount(); ii++) {
            final String name = inputTable.getColumnName(ii);
            final VoltType type = inputTable.getColumnType(ii);
            final Column column = outputTableSchema.getColumns().get(name);

            if (column == null) {
                return true;
            }

            if (column.getIndex() != ii) {
                return true;
            }

            if (column.getType() != type.getValue()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

                {
                    // otherwise if it's nullable, insert null,
                    Column catalog_column =
                        outputTableSchema.getColumns().
                        get(new_table.getColumnName(i));
                    VoltType default_type =
                        VoltType.get((byte)catalog_column.getDefaulttype());
                    if (default_type != VoltType.INVALID)
                    {
                        // if there is a default value for this table/column
                        // insert the default value
                        try
                        {
                            coerced_values[i] =
                                VoltTypeUtil.
                                getObjectFromString(default_type,
                                                    catalog_column.
                                                    getDefaultvalue());
                        }
                        catch (ParseException e)
                        {
                            String message = "Column: ";
                            message += new_table.getColumnName(i);
                            message += " has an unparseable default: ";
                            message += catalog_column.getDefaultvalue();
                            message += " for VoltType: ";
                            message += default_type.toString();
                            throw new VoltTypeException(message);
                        }
                    }
                    else if (catalog_column.getNullable())
                    {
View Full Code Here

TOP

Related Classes of org.voltdb.VoltType

Copyright © 2018 www.massapicom. 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.