Class TableSchema.ColumnType
java.lang.Object
org.apache.beam.sdk.io.clickhouse.TableSchema.ColumnType
- All Implemented Interfaces:
Serializable
- Enclosing class:
TableSchema
A descriptor for a column type.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final intDefaultDateTime64precision in ClickHouse.static final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnTypestatic final TableSchema.ColumnType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TableSchema.ColumnTypearray(TableSchema.ColumnType arrayElementType) abstract @Nullable TableSchema.ColumnTypestatic org.apache.beam.sdk.io.clickhouse.TableSchema.ColumnType.Builderbuilder()static TableSchema.ColumnTypeReturns aDateTime64type with ClickHouse's default precision of 3.static TableSchema.ColumnTypedateTime64(int precision) static TableSchema.ColumnTypestatic TableSchema.ColumnTypestatic TableSchema.ColumnTypefixedString(int size) abstract booleannullable()static TableSchema.ColumnTypenullable(TableSchema.TypeName typeName) static TableSchema.ColumnTypeof(TableSchema.TypeName typeName) static TableSchema.ColumnTypeParse string with ClickHouse type toTableSchema.ColumnType.static ObjectparseDefaultExpression(TableSchema.ColumnType columnType, String value) Get default value of a column based on expression.Sub-second precision (0–9) ofDateTime64.static TableSchema.ColumnTypetuple(Map<String, TableSchema.ColumnType> elements) abstract @Nullable Map<String, TableSchema.ColumnType> abstract TableSchema.TypeNametypeName()withNullable(boolean nullable)
-
Field Details
-
DATE
-
DATETIME
-
FLOAT32
-
FLOAT64
-
INT8
-
INT16
-
INT32
-
INT64
-
STRING
-
UINT8
-
UINT16
-
UINT32
-
UINT64
-
BOOL
-
TUPLE
-
DEFAULT_DATETIME64_PRECISION
public static final int DEFAULT_DATETIME64_PRECISIONDefaultDateTime64precision in ClickHouse.- See Also:
-
-
Constructor Details
-
ColumnType
public ColumnType()
-
-
Method Details
-
nullable
public abstract boolean nullable() -
typeName
-
enumValues
-
fixedStringSize
-
arrayElementType
-
tupleTypes
-
precision
Sub-second precision (0–9) ofDateTime64.nullfor other types. -
withNullable
-
of
-
nullable
-
fixedString
-
dateTime64
Returns aDateTime64type with ClickHouse's default precision of 3. -
dateTime64
-
enum8
-
enum16
-
array
-
tuple
-
parse
Parse string with ClickHouse type toTableSchema.ColumnType.- Parameters:
str- string representation of ClickHouse type- Returns:
- type of ClickHouse column
- Throws:
IllegalArgumentException- ifstris not a valid ClickHouse column type
-
parseDefaultExpression
Get default value of a column based on expression.E.g., "CREATE TABLE hits(id Int32, count Int32 DEFAULT <str>)"
- Parameters:
columnType- type of ClickHouse expressionvalue- ClickHouse expression- Returns:
- value of ClickHouse expression
-
builder
public static org.apache.beam.sdk.io.clickhouse.TableSchema.ColumnType.Builder builder()
-