public class RelHint extends Object
A hint can be used to:
In order to support hint override, each hint has a inheritPath (integers list) to
record its propagate path from the root node, number `0` represents the hint was propagated
along the first(left) child, number `1` represents the hint was propagated along the
second(right) child. Given a relational expression tree with initial attached hints:
Filter (Hint1)
|
Join
/ \
Scan Project (Hint2)
|
Scan2
The plan would have hints path as follows (assumes each hint can be propagated to all child nodes):
- Filter → {Hint1[]}
- Join → {Hint1[0]}
- Scan → {Hint1[0, 0]}
- Project → {Hint1[0,1], Hint2[]}
- Scan2 → {[Hint1[0, 1, 0], Hint2[0]}
listOptions and kvOptions are supposed to contain the same information,
they are mutually exclusive, that means, they can not both be non-empty.
RelHint is immutable.
| Modifier and Type | Class and Description |
|---|---|
static class |
RelHint.Builder
Builder for
RelHint. |
| Modifier and Type | Field and Description |
|---|---|
String |
hintName |
com.google.common.collect.ImmutableList<Integer> |
inheritPath |
Map<String,String> |
kvOptions |
List<String> |
listOptions |
| Modifier and Type | Method and Description |
|---|---|
static RelHint.Builder |
builder(String hintName)
Creates a hint builder with specified hint name.
|
RelHint |
copy(List<Integer> inheritPath)
Returns a copy of this hint with specified inherit path.
|
boolean |
equals(@Nullable Object o) |
int |
hashCode() |
String |
toString() |
public final com.google.common.collect.ImmutableList<Integer> inheritPath
public final String hintName
public static RelHint.Builder builder(String hintName)
public RelHint copy(List<Integer> inheritPath)
inheritPath - Hint pathRelHintCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.