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(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
java.util.Set<CorrelationId> variablesSet,
JoinRelType joinType) |
Modifier and Type | Method and Description |
---|---|
PCollection<BeamRecord> |
buildBeamPipeline(PCollectionTuple inputPCollections,
BeamSqlEnv sqlEnv)
A
BeamRelNode is a recursive structure, the
BeamQueryPlanner visits it with a DFS(Depth-First-Search)
algorithm. |
Join |
copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
PCollection<BeamRecord> |
sideInputJoin(PCollection<KV<BeamRecord,BeamRecord>> extractedLeftRows,
PCollection<KV<BeamRecord,BeamRecord>> extractedRightRows,
BeamRecord leftNullRow,
BeamRecord rightNullRow) |
public BeamJoinRel(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 PCollection<BeamRecord> buildBeamPipeline(PCollectionTuple inputPCollections, BeamSqlEnv sqlEnv) throws java.lang.Exception
BeamRelNode
BeamRelNode
is a recursive structure, the
BeamQueryPlanner
visits it with a DFS(Depth-First-Search)
algorithm.buildBeamPipeline
in interface BeamRelNode
java.lang.Exception
public PCollection<BeamRecord> sideInputJoin(PCollection<KV<BeamRecord,BeamRecord>> extractedLeftRows, PCollection<KV<BeamRecord,BeamRecord>> extractedRightRows, BeamRecord leftNullRow, BeamRecord rightNullRow)