Interface LookupTableSource.LookupContext
-
- All Superinterfaces:
DynamicTableSource.Context
- Enclosing interface:
- LookupTableSource
@PublicEvolving public static interface LookupTableSource.LookupContext extends DynamicTableSource.Context
Context for creating runtime implementation via aLookupTableSource.LookupRuntimeProvider
.It offers utilities by the planner for creating runtime implementation with minimal dependencies to internal data structures.
Methods should be called in
LookupTableSource.getLookupRuntimeProvider(LookupContext)
. Returned instances that areSerializable
can be directly passed into the runtime implementation class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[][]
getKeys()
Returns an array of key index paths that should be used during the lookup.boolean
preferCustomShuffle()
Whether the distribution of the input stream data matches the partitioner provided by theLookupTableSource
.-
Methods inherited from interface org.apache.flink.table.connector.source.DynamicTableSource.Context
createDataStructureConverter, createTypeInformation, createTypeInformation
-
-
-
-
Method Detail
-
getKeys
int[][] getKeys()
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.- Returns:
- array of key index paths
-
preferCustomShuffle
boolean preferCustomShuffle()
Whether the distribution of the input stream data matches the partitioner provided by theLookupTableSource
. If the interfaceSupportsLookupCustomShuffle
is not implemented, false is guaranteed to be returned.The method
LookupTableSource.getLookupRuntimeProvider(org.apache.flink.table.connector.source.LookupTableSource.LookupContext)
will be called first, then the framework will set up the custom shuffle based on the result returned bySupportsLookupCustomShuffle.getPartitioner()
.- Returns:
- true if planner is ready to apply the custom partitioner provided by the source, otherwise returns false
-
-