public abstract class FlinkHints extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HINT_ALIAS |
static String |
HINT_NAME_JSON_AGGREGATE_WRAPPED
Internal hint that JSON aggregation function arguments have been wrapped already.
|
static String |
HINT_NAME_OPTIONS |
Constructor and Description |
---|
FlinkHints() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canTransposeToTableScan(org.apache.calcite.rel.RelNode node) |
static org.apache.calcite.rel.RelNode |
capitalizeJoinHints(org.apache.calcite.rel.RelNode root) |
static org.apache.calcite.rel.RelNode |
clearJoinHintsOnUnmatchedNodes(org.apache.calcite.rel.RelNode root)
Clear the join hints on some nodes where these hints should not be attached.
|
static List<org.apache.calcite.rel.hint.RelHint> |
getAllJoinHints(List<org.apache.calcite.rel.hint.RelHint> allHints)
Get all join hints.
|
static Map<String,String> |
getHintedOptions(List<org.apache.calcite.rel.hint.RelHint> tableHints)
Returns the OPTIONS hint options from the given list of table hints
tableHints , never
null. |
static List<org.apache.calcite.rel.hint.RelHint> |
getQueryBlockAliasHints(List<org.apache.calcite.rel.hint.RelHint> allHints)
Get all query block alias hints.
|
static Optional<String> |
getTableAlias(org.apache.calcite.rel.RelNode node) |
static Optional<String> |
getTableName(org.apache.calcite.plan.RelOptTable table)
Returns the qualified name of a table scan, otherwise returns empty.
|
static Map<String,String> |
mergeTableOptions(Map<String,String> hints,
Map<String,String> props)
Merges the dynamic table options from
hints and static table options from table
definition props . |
static org.apache.calcite.rel.RelNode |
resolveSubQuery(org.apache.calcite.rel.RelNode node,
java.util.function.Function<org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode> resolver)
Resolve the RelNode of the sub query in the node and return a new node.
|
static String |
stringifyHints(List<org.apache.calcite.rel.hint.RelHint> hints) |
public static final String HINT_NAME_OPTIONS
public static final String HINT_ALIAS
public static final String HINT_NAME_JSON_AGGREGATE_WRAPPED
WrapJsonAggFunctionArgumentsRule
.public static Map<String,String> getHintedOptions(List<org.apache.calcite.rel.hint.RelHint> tableHints)
tableHints
, never
null.public static Map<String,String> mergeTableOptions(Map<String,String> hints, Map<String,String> props)
hints
and static table options from table
definition props
.
The options in hints
would override the ones in props
if they have the
same option key.
hints
- Dynamic table options, usually from the OPTIONS hintprops
- Static table options defined in DDL or connect APIprops
if there is
no dynamic table optionspublic static boolean canTransposeToTableScan(org.apache.calcite.rel.RelNode node)
public static Optional<String> getTableName(org.apache.calcite.plan.RelOptTable table)
public static List<org.apache.calcite.rel.hint.RelHint> getAllJoinHints(List<org.apache.calcite.rel.hint.RelHint> allHints)
public static List<org.apache.calcite.rel.hint.RelHint> getQueryBlockAliasHints(List<org.apache.calcite.rel.hint.RelHint> allHints)
Because query block alias hints will be propagated from root to leaves, so maybe one node will contain multi alias hints. But only the first one is the real query block name where this node is.
public static org.apache.calcite.rel.RelNode capitalizeJoinHints(org.apache.calcite.rel.RelNode root)
public static org.apache.calcite.rel.RelNode resolveSubQuery(org.apache.calcite.rel.RelNode node, java.util.function.Function<org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode> resolver)
public static org.apache.calcite.rel.RelNode clearJoinHintsOnUnmatchedNodes(org.apache.calcite.rel.RelNode root)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.