Class LookupJoinUtil
- java.lang.Object
-
- org.apache.flink.table.planner.plan.utils.LookupJoinUtil
-
@Internal public final class LookupJoinUtil extends Object
Utilities for lookup joins usingLookupTableSource
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LookupJoinUtil.AsyncLookupOptions
AsyncLookupOptions includes async related options.static class
LookupJoinUtil.ConstantLookupKey
ALookupJoinUtil.LookupKey
whose value is constant.static class
LookupJoinUtil.FieldRefLookupKey
ALookupJoinUtil.LookupKey
whose value comes from the left table field.static class
LookupJoinUtil.LookupKey
A field used as an equal condition when querying content from a dimension table.static class
LookupJoinUtil.RetryLookupOptions
RetryOptions includes retry lookup related options.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserDefinedFunction
getLookupFunction(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, ClassLoader classLoader, boolean async, ResultRetryStrategy retryStrategy)
Gets required lookup function (async or sync) from temporal table , will raise an error if specified lookup function instance not found.static LookupJoinUtil.AsyncLookupOptions
getMergedAsyncOptions(org.apache.calcite.rel.hint.RelHint lookupHint, TableConfig config, ChangelogMode inputChangelogMode)
static int[]
getOrderedLookupKeys(Collection<Integer> allLookupKeys)
Gets lookup keys sorted by index in ascending order.static boolean
isAsyncLookup(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, org.apache.calcite.rel.hint.RelHint lookupHint, boolean upsertMaterialize)
This method determines whether async lookup is enabled according to the given lookup keys with considering lookupRelHint
and required upsertMaterialize.
-
-
-
Method Detail
-
getOrderedLookupKeys
public static int[] getOrderedLookupKeys(Collection<Integer> allLookupKeys)
Gets lookup keys sorted by index in ascending order.
-
getMergedAsyncOptions
public static LookupJoinUtil.AsyncLookupOptions getMergedAsyncOptions(org.apache.calcite.rel.hint.RelHint lookupHint, TableConfig config, ChangelogMode inputChangelogMode)
-
isAsyncLookup
public static boolean isAsyncLookup(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, org.apache.calcite.rel.hint.RelHint lookupHint, boolean upsertMaterialize)
This method determines whether async lookup is enabled according to the given lookup keys with considering lookupRelHint
and required upsertMaterialize. Note: it will not create the function instance to avoid potential heavy cost during optimization phase. if required upsertMaterialize is true, will return synchronous lookup function only, otherwise prefers asynchronous lookup function except there's a hint option 'async' = 'false', will raise an error if both candidates not found.1. if upsertMaterialize == true : return false 2. preferAsync = except there is a hint option 'async' = 'false' if (preferAsync) { return asyncFound ? true : false } else { return syncFound ? false : true }
-
getLookupFunction
public static UserDefinedFunction getLookupFunction(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, ClassLoader classLoader, boolean async, ResultRetryStrategy retryStrategy)
Gets required lookup function (async or sync) from temporal table , will raise an error if specified lookup function instance not found.
-
-