@Internal public final class SinkRuntimeProviderContext extends Object implements DynamicTableSink.Context
DynamicTableSink.Context
.Constructor and Description |
---|
SinkRuntimeProviderContext(boolean isBounded) |
SinkRuntimeProviderContext(boolean isBounded,
int[][] targetColumns) |
Modifier and Type | Method and Description |
---|---|
DynamicTableSink.DataStructureConverter |
createDataStructureConverter(DataType consumedDataType)
Creates a converter for mapping between Flink's internal data structures and objects
specified by the given
DataType that can be passed into a runtime implementation. |
TypeInformation<?> |
createTypeInformation(DataType consumedDataType)
Creates type information describing the internal data structures of the given
DataType . |
TypeInformation<?> |
createTypeInformation(LogicalType consumedLogicalType)
Creates type information describing the internal data structures of the given
LogicalType . |
Optional<int[][]> |
getTargetColumns()
Returns an
Optional array of column index paths related to user specified target
column list or Optional.empty() when not specified. |
boolean |
isBounded()
Returns whether a runtime implementation can expect a finite number of rows.
|
public SinkRuntimeProviderContext(boolean isBounded)
public SinkRuntimeProviderContext(boolean isBounded, @Nullable int[][] targetColumns)
public boolean isBounded()
DynamicTableSink.Context
This information might be derived from the session's execution mode and/or kind of query.
isBounded
in interface DynamicTableSink.Context
public TypeInformation<?> createTypeInformation(DataType consumedDataType)
DynamicTableSink.Context
DataType
.createTypeInformation
in interface DynamicTableSink.Context
ResolvedSchema.toPhysicalRowDataType()
public TypeInformation<?> createTypeInformation(LogicalType consumedLogicalType)
DynamicTableSink.Context
LogicalType
.createTypeInformation
in interface DynamicTableSink.Context
public DynamicTableSink.DataStructureConverter createDataStructureConverter(DataType consumedDataType)
DynamicTableSink.Context
DataType
that can be passed into a runtime implementation.
For example, RowData
and its fields can be converted into a Row
, or
the internal representation for structured types can be converted back into the original
(possibly nested) POJO.
createDataStructureConverter
in interface DynamicTableSink.Context
LogicalType.supportsOutputConversion(Class)
public Optional<int[][]> getTargetColumns()
DynamicTableSink.Context
Optional
array of column index paths related to user specified target
column list or Optional.empty()
when not specified. The array indices are 0-based
and support composite columns within (possibly nested) structures.
This information comes from the column list of the DML clause, e.g., for a sink table
t1 which schema is: a STRING, b ROW < b1 INT, b2 STRING>, c BIGINT
[[0], [1, 1]]
. The statement 'insert into t1 select ...' without
specifying a column list will return Optional.empty()
.
[[0], [1, 0]]
.
Note: will always return empty for the delete statement because it has no column list.
getTargetColumns
in interface DynamicTableSink.Context
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.