public class DeltaColumnBuilder
extends Object
Builder to specify a table column.
See DeltaTableBuilder
for examples.
Modifier and Type | Method and Description |
---|---|
org.apache.spark.sql.types.StructField |
build()
:: Evolving ::
|
DeltaColumnBuilder |
comment(String comment)
:: Evolving ::
|
DeltaColumnBuilder |
dataType(org.apache.spark.sql.types.DataType dataType)
:: Evolving ::
|
DeltaColumnBuilder |
dataType(String dataType)
:: Evolving ::
|
DeltaColumnBuilder |
generatedAlwaysAs(String expr)
:: Evolving ::
|
DeltaColumnBuilder |
nullable(boolean nullable)
:: Evolving ::
|
public org.apache.spark.sql.types.StructField build()
Build the column as a structField.
public DeltaColumnBuilder comment(String comment)
Specify a column comment.
comment
- string column descriptionpublic DeltaColumnBuilder dataType(String dataType)
Specify the column data type.
dataType
- string column data typepublic DeltaColumnBuilder dataType(org.apache.spark.sql.types.DataType dataType)
Specify the column data type.
dataType
- DataType column data typepublic DeltaColumnBuilder generatedAlwaysAs(String expr)
Specify a expression if the column is always generated as a function of other columns.
expr
- string the the generation expressionpublic DeltaColumnBuilder nullable(boolean nullable)
Specify whether the column can be null.
nullable
- boolean whether the column can be null or not.