@PublicEvolving public class Schema extends Object implements Serializable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Schema.Builder
A builder for constructing an immutable but still unresolved
Schema. |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
comment()
Returns the comment of the table or data collection.
|
Schema |
copy(List<Column> columns)
Returns a copy of the schema with a replaced list of
Column. |
String |
describeOptions() |
boolean |
equals(Object o) |
Optional<Column> |
getColumn(String columnName)
Returns the
Column instance for the given column name. |
int |
getColumnCount()
Returns the number of columns of this schema.
|
List<DataType> |
getColumnDataTypes()
Returns all column data types.
|
List<String> |
getColumnNames()
Returns all column names.
|
List<Column> |
getColumns()
Returns all
Columns of this schema. |
int |
hashCode() |
static Schema.Builder |
newBuilder()
Builder for configuring and creating instances of
Schema. |
Map<String,String> |
options()
Returns the options of the table or data collection.
|
List<String> |
partitionKeys()
Returns the partition keys of the table or data collection.
|
List<String> |
primaryKeys()
Returns the primary keys of the table or data collection.
|
DataType |
toRowDataType()
Converts all columns of this schema into a (possibly nested) row data type.
|
String |
toString() |
public int getColumnCount()
public List<String> getColumnNames()
public List<DataType> getColumnDataTypes()
public List<String> primaryKeys()
public List<String> partitionKeys()
public String describeOptions()
public String comment()
public Optional<Column> getColumn(String columnName)
Column instance for the given column name.columnName - the name of the columnpublic DataType toRowDataType()
public Schema copy(List<Column> columns)
Column.public static Schema.Builder newBuilder()
Schema.Copyright © 2025 The Apache Software Foundation. All rights reserved.