Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Schema |
build()
Returns an instance of an unresolved
Schema . |
Schema.Builder |
column(String columnName,
DataType dataType)
Declares a column that is appended to this schema.
|
Schema.Builder |
column(String columnName,
DataType dataType,
String description)
Declares a column that is appended to this schema.
|
Schema.Builder |
comment(String comment)
Declares table comment.
|
int |
getHighestFieldId() |
Schema.Builder |
option(String key,
String value)
Declares an option.
|
Schema.Builder |
options(Map<String,String> options)
Declares options.
|
Schema.Builder |
partitionKeys(List<String> columnNames)
Declares partition keys.
|
Schema.Builder |
partitionKeys(String... columnNames)
Declares partition keys.
|
Schema.Builder |
primaryKey(List<String> columnNames)
Declares a primary key constraint for a set of given columns.
|
Schema.Builder |
primaryKey(String... columnNames)
Declares a primary key constraint for a set of given columns.
|
public int getHighestFieldId()
public Schema.Builder column(String columnName, DataType dataType)
columnName
- column namedataType
- data type of the columnpublic Schema.Builder column(String columnName, DataType dataType, @Nullable String description)
columnName
- column namedataType
- data type of the columndescription
- description of the columnpublic Schema.Builder partitionKeys(String... columnNames)
public Schema.Builder partitionKeys(List<String> columnNames)
public Schema.Builder primaryKey(String... columnNames)
columnNames
- columns that form a unique primary keypublic Schema.Builder primaryKey(List<String> columnNames)
columnNames
- columns that form a unique primary keypublic Schema.Builder options(Map<String,String> options)
public Schema.Builder option(String key, String value)
public Schema.Builder comment(@Nullable String comment)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.