@Internal public final class LookupJoinUtil extends Object
LookupTableSource
.Modifier and Type | Class and Description |
---|---|
static class |
LookupJoinUtil.AsyncLookupOptions
AsyncLookupOptions includes async related options.
|
static class |
LookupJoinUtil.ConstantLookupKey
A
LookupJoinUtil.LookupKey whose value is constant. |
static class |
LookupJoinUtil.FieldRefLookupKey
A
LookupJoinUtil.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.
|
Modifier and Type | Method and 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 lookup
RelHint and required upsertMaterialize. |
public static int[] getOrderedLookupKeys(Collection<Integer> allLookupKeys)
public static LookupJoinUtil.AsyncLookupOptions getMergedAsyncOptions(org.apache.calcite.rel.hint.RelHint lookupHint, TableConfig config, ChangelogMode inputChangelogMode)
public static boolean isAsyncLookup(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, org.apache.calcite.rel.hint.RelHint lookupHint, boolean upsertMaterialize)
RelHint
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
}
public static UserDefinedFunction getLookupFunction(org.apache.calcite.plan.RelOptTable temporalTable, Collection<Integer> lookupKeys, ClassLoader classLoader, boolean async, ResultRetryStrategy retryStrategy)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.