Search in sources :

Example 1 with ColumnTypeAttributes

use of org.apache.kudu.ColumnTypeAttributes in project presto by prestodb.

the class KuduClientSession method setTypeAttributes.

private void setTypeAttributes(ColumnMetadata columnMetadata, ColumnSchema.ColumnSchemaBuilder builder) {
    if (columnMetadata.getType() instanceof DecimalType) {
        DecimalType type = (DecimalType) columnMetadata.getType();
        ColumnTypeAttributes attributes = new ColumnTypeAttributes.ColumnTypeAttributesBuilder().precision(type.getPrecision()).scale(type.getScale()).build();
        builder.typeAttributes(attributes);
    }
}
Also used : ColumnTypeAttributes(org.apache.kudu.ColumnTypeAttributes) DecimalType(com.facebook.presto.common.type.DecimalType)

Aggregations

DecimalType (com.facebook.presto.common.type.DecimalType)1 ColumnTypeAttributes (org.apache.kudu.ColumnTypeAttributes)1