public class FlinkSchemaUtil
extends java.lang.Object
This inconsistent types:
Modifier and Type | Method and Description |
---|---|
static Type |
convert(org.apache.flink.table.types.logical.LogicalType flinkType)
Convert a
Flink type to a Type . |
static Schema |
convert(org.apache.flink.table.catalog.ResolvedSchema flinkSchema)
Convert the flink table schema to apache iceberg schema with column comment.
|
static org.apache.flink.table.types.logical.RowType |
convert(Schema schema)
Convert a
Schema to a Flink type . |
static Schema |
convert(Schema baseSchema,
org.apache.flink.table.api.TableSchema flinkSchema)
Convert a Flink
TableSchema to a Schema based on the given schema. |
static Schema |
convert(org.apache.flink.table.api.TableSchema schema)
Deprecated.
Use
convert(ResolvedSchema) instead. |
static org.apache.flink.table.types.logical.LogicalType |
convert(Type type)
Convert a
Type to a Flink type . |
static org.apache.flink.table.api.TableSchema |
toSchema(org.apache.flink.table.types.logical.RowType rowType)
Convert a
RowType to a TableSchema . |
static org.apache.flink.table.api.TableSchema |
toSchema(Schema schema)
Convert a
Schema to a TableSchema . |
@Deprecated public static Schema convert(org.apache.flink.table.api.TableSchema schema)
convert(ResolvedSchema)
instead.public static Schema convert(org.apache.flink.table.catalog.ResolvedSchema flinkSchema)
public static Schema convert(Schema baseSchema, org.apache.flink.table.api.TableSchema flinkSchema)
TableSchema
to a Schema
based on the given schema.
This conversion does not assign new ids; it uses ids from the base schema.
Data types, field order, and nullability will match the Flink type. This conversion may return a schema that is not compatible with base schema.
baseSchema
- a Schema on which conversion is basedflinkSchema
- a Flink TableSchemajava.lang.IllegalArgumentException
- if the type cannot be converted or there are missing idspublic static org.apache.flink.table.types.logical.RowType convert(Schema schema)
Schema
to a Flink type
.schema
- a Schemajava.lang.IllegalArgumentException
- if the type cannot be converted to Flinkpublic static org.apache.flink.table.types.logical.LogicalType convert(Type type)
Type
to a Flink type
.type
- a Typejava.lang.IllegalArgumentException
- if the type cannot be converted to Flinkpublic static Type convert(org.apache.flink.table.types.logical.LogicalType flinkType)
Flink type
to a Type
.flinkType
- a FlinkTypepublic static org.apache.flink.table.api.TableSchema toSchema(org.apache.flink.table.types.logical.RowType rowType)
RowType
to a TableSchema
.rowType
- a RowType