@InterfaceAudience.Public @InterfaceStability.Evolving public static class ColumnSchema.ColumnSchemaBuilder extends Object
Constructor and Description |
---|
ColumnSchemaBuilder(String name,
Type type)
Constructor for the required parameters.
|
Modifier and Type | Method and Description |
---|---|
ColumnSchema |
build()
Builds a
ColumnSchema using the passed parameters. |
ColumnSchema.ColumnSchemaBuilder |
compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)
Set the compression algorithm for this column.
|
ColumnSchema.ColumnSchemaBuilder |
defaultValue(Object defaultValue)
Sets the default value that will be read from the column.
|
ColumnSchema.ColumnSchemaBuilder |
desiredBlockSize(int blockSize)
Set the desired block size for this column.
|
ColumnSchema.ColumnSchemaBuilder |
encoding(ColumnSchema.Encoding encoding)
Set the block encoding for this column.
|
ColumnSchema.ColumnSchemaBuilder |
key(boolean key)
Sets if the column is part of the row key.
|
ColumnSchema.ColumnSchemaBuilder |
nullable(boolean nullable)
Marks the column as allowing null values.
|
ColumnSchema.ColumnSchemaBuilder |
typeAttributes(ColumnTypeAttributes typeAttributes)
Set the column type attributes for this column.
|
public ColumnSchema.ColumnSchemaBuilder key(boolean key)
key
- a boolean that indicates if the column is part of the keypublic ColumnSchema.ColumnSchemaBuilder nullable(boolean nullable)
NOTE: the "not-nullable-by-default" behavior here differs from
the equivalent API in the Python and C++ clients. It also differs from the
standard behavior of SQL CREATE TABLE
statements. It is
recommended to always specify nullability explicitly using this API
in order to avoid confusion.
nullable
- a boolean that indicates if the column allows null valuespublic ColumnSchema.ColumnSchemaBuilder defaultValue(Object defaultValue)
defaultValue
- a Java object representation of the default value that's readpublic ColumnSchema.ColumnSchemaBuilder desiredBlockSize(int blockSize)
blockSize
- the desired block size, in bytespublic ColumnSchema.ColumnSchemaBuilder encoding(ColumnSchema.Encoding encoding)
public ColumnSchema.ColumnSchemaBuilder compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)
public ColumnSchema.ColumnSchemaBuilder typeAttributes(ColumnTypeAttributes typeAttributes)
public ColumnSchema build()
ColumnSchema
using the passed parameters.ColumnSchema
Copyright © 2018 The Apache Software Foundation. All rights reserved.