Class LookupRuntimeProviderContext
- java.lang.Object
-
- org.apache.flink.table.runtime.connector.source.LookupRuntimeProviderContext
-
- All Implemented Interfaces:
DynamicTableSource.Context
,LookupTableSource.LookupContext
@Internal public final class LookupRuntimeProviderContext extends Object implements LookupTableSource.LookupContext
Implementation ofDynamicTableSource.Context
.
-
-
Constructor Summary
Constructors Constructor Description LookupRuntimeProviderContext(int[][] lookupKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicTableSource.DataStructureConverter
createDataStructureConverter(DataType producedDataType)
Creates a converter for mapping between objects specified by the givenDataType
and Flink's internal data structures that can be passed into a runtime implementation.TypeInformation<?>
createTypeInformation(DataType producedDataType)
Creates type information describing the internal data structures of the givenDataType
.TypeInformation<?>
createTypeInformation(LogicalType producedLogicalType)
Creates type information describing the internal data structures of the givenLogicalType
.int[][]
getKeys()
Returns an array of key index paths that should be used during the lookup.
-
-
-
Method Detail
-
getKeys
public int[][] getKeys()
Description copied from interface:LookupTableSource.LookupContext
Returns an array of key index paths that should be used during the lookup. The indices are 0-based and support composite keys within (possibly nested) structures.For example, given a table with data type
ROW < i INT, s STRING, r ROW < i2 INT, s2 STRING > >
, this method would return[[0], [2, 1]]
wheni
ands2
are used for performing a lookup.- Specified by:
getKeys
in interfaceLookupTableSource.LookupContext
- Returns:
- array of key index paths
-
createTypeInformation
public TypeInformation<?> createTypeInformation(DataType producedDataType)
Description copied from interface:DynamicTableSource.Context
Creates type information describing the internal data structures of the givenDataType
.- Specified by:
createTypeInformation
in interfaceDynamicTableSource.Context
- See Also:
ResolvedSchema.toPhysicalRowDataType()
-
createTypeInformation
public TypeInformation<?> createTypeInformation(LogicalType producedLogicalType)
Description copied from interface:DynamicTableSource.Context
Creates type information describing the internal data structures of the givenLogicalType
.- Specified by:
createTypeInformation
in interfaceDynamicTableSource.Context
-
createDataStructureConverter
public DynamicTableSource.DataStructureConverter createDataStructureConverter(DataType producedDataType)
Description copied from interface:DynamicTableSource.Context
Creates a converter for mapping between objects specified by the givenDataType
and Flink's internal data structures that can be passed into a runtime implementation.For example, a
Row
and its fields can be converted intoRowData
, or a (possibly nested) POJO can be converted into the internal representation for structured types.- Specified by:
createDataStructureConverter
in interfaceDynamicTableSource.Context
- See Also:
LogicalType.supportsInputConversion(Class)
,ResolvedSchema.toPhysicalRowDataType()
-
-