use of com.facebook.presto.kudu.properties.ColumnDesign in project presto by prestodb.
the class KuduClientSession method toColumnSchema.
private ColumnSchema toColumnSchema(ColumnMetadata columnMetadata) {
String name = columnMetadata.getName();
ColumnDesign design = KuduTableProperties.getColumnDesign(columnMetadata.getProperties());
Type ktype = TypeHelper.toKuduClientType(columnMetadata.getType());
ColumnSchema.ColumnSchemaBuilder builder = new ColumnSchema.ColumnSchemaBuilder(name, ktype);
builder.key(design.isPrimaryKey()).nullable(design.isNullable());
setEncoding(name, builder, design);
setCompression(name, builder, design);
setTypeAttributes(columnMetadata, builder);
return builder.build();
}
Aggregations