public static class TableSchema.Builder extends Object
TableSchema
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TableSchema |
build()
Returns a
TableSchema instance. |
TableSchema.Builder |
field(String name,
DataType dataType)
Add a field with name and data type.
|
TableSchema.Builder |
field(String name,
TypeInformation<?> typeInfo)
Deprecated.
This method will be removed in future versions as it uses the old type system. It
is recommended to use
field(String, DataType) instead which uses the new type
system based on DataTypes . Please make sure to use either the old or the new
type system consistently to avoid unintended behavior. See the website documentation
for more information. |
TableSchema.Builder |
fields(String[] names,
DataType[] dataTypes)
Add an array of fields with names and data types.
|
public TableSchema.Builder field(String name, DataType dataType)
The call order of this method determines the order of fields in the schema.
public TableSchema.Builder fields(String[] names, DataType[] dataTypes)
The call order of this method determines the order of fields in the schema.
@Deprecated public TableSchema.Builder field(String name, TypeInformation<?> typeInfo)
field(String, DataType)
instead which uses the new type
system based on DataTypes
. Please make sure to use either the old or the new
type system consistently to avoid unintended behavior. See the website documentation
for more information.public TableSchema build()
TableSchema
instance.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.