public class BeamJoinRel extends Join implements BeamRelNode
BeamRelNode
to replace a Join
node.
Support for join can be categorized into 3 cases:
For the first two cases, a standard join is utilized as long as the windowFn of the both sides match.
For the third case, sideInput
is utilized to implement the join, so there are some
constraints:
FULL OUTER JOIN
is not supported.LEFT OUTER JOIN
, the unbounded table should on the left side.RIGHT OUTER JOIN
, the unbounded table should on the right side.There are also some general constraints:
Constructor and Description |
---|
BeamJoinRel(BeamSqlEnv sqlEnv,
RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
java.util.Set<CorrelationId> variablesSet,
JoinRelType joinType) |
Modifier and Type | Method and Description |
---|---|
Join |
copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
PCollection<Row> |
sideInputJoin(PCollection<KV<Row,Row>> extractedLeftRows,
PCollection<KV<Row,Row>> extractedRightRows,
Row leftNullRow,
Row rightNullRow) |
PTransform<PCollectionTuple,PCollection<Row>> |
toPTransform()
A
BeamRelNode is a recursive structure, the BeamQueryPlanner visits it with a
DFS(Depth-First-Search) algorithm. |
public BeamJoinRel(BeamSqlEnv sqlEnv, RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, RexNode condition, java.util.Set<CorrelationId> variablesSet, JoinRelType joinType)
public Join copy(RelTraitSet traitSet, RexNode conditionExpr, RelNode left, RelNode right, JoinRelType joinType, boolean semiJoinDone)
public PTransform<PCollectionTuple,PCollection<Row>> toPTransform()
BeamRelNode
BeamRelNode
is a recursive structure, the BeamQueryPlanner
visits it with a
DFS(Depth-First-Search) algorithm.toPTransform
in interface BeamRelNode
public PCollection<Row> sideInputJoin(PCollection<KV<Row,Row>> extractedLeftRows, PCollection<KV<Row,Row>> extractedRightRows, Row leftNullRow, Row rightNullRow)