public class FlinkSchemaUtil
extends java.lang.Object
This inconsistent types:
| Modifier and Type | Method and Description |
|---|---|
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)
Convert the flink table schema to apache iceberg schema.
|
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. |
public static Schema convert(org.apache.flink.table.api.TableSchema schema)
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 org.apache.flink.table.api.TableSchema toSchema(org.apache.flink.table.types.logical.RowType rowType)
RowType to a TableSchema.rowType - a RowType