public abstract class NestedLoopJoinTemplate extends Object implements NestedLoopJoin
TEMPLATE_DEFINITION| Constructor and Description |
|---|
NestedLoopJoinTemplate() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
doEval(int leftIndex,
int batchIndex,
int recordIndexWithinBatch) |
abstract void |
doSetup(FragmentContext context,
VectorContainer rightContainer,
RecordBatch leftBatch,
RecordBatch outgoing) |
abstract void |
emitLeft(int leftIndex,
int outIndex) |
abstract void |
emitRight(int batchIndex,
int recordIndexWithinBatch,
int outIndex) |
int |
outputRecords(org.apache.calcite.rel.core.JoinRelType joinType)
Main entry point for producing the output records.
|
void |
setTargetOutputCount(int targetOutputRecords) |
void |
setupNestedLoopJoin(FragmentContext context,
RecordBatch left,
ExpandableHyperContainer rightContainer,
LinkedList<Integer> rightCounts,
NestedLoopJoinBatch outgoing)
Method initializes necessary state and invokes the doSetup() to set the
input and output value vector references.
|
public void setupNestedLoopJoin(FragmentContext context, RecordBatch left, ExpandableHyperContainer rightContainer, LinkedList<Integer> rightCounts, NestedLoopJoinBatch outgoing)
setupNestedLoopJoin in interface NestedLoopJoincontext - Fragment contextleft - Current left input batch being processedrightContainer - Hyper containerrightCounts - Counts for each right containeroutgoing - Output batchpublic void setTargetOutputCount(int targetOutputRecords)
setTargetOutputCount in interface NestedLoopJoinpublic int outputRecords(org.apache.calcite.rel.core.JoinRelType joinType)
outputRecords in interface NestedLoopJoinjoinType - join type (INNER ot LEFT)public abstract void doSetup(@Named(value="context")
FragmentContext context,
@Named(value="rightContainer")
VectorContainer rightContainer,
@Named(value="leftBatch")
RecordBatch leftBatch,
@Named(value="outgoing")
RecordBatch outgoing)
doSetup in interface NestedLoopJoinpublic abstract void emitRight(@Named(value="batchIndex")
int batchIndex,
@Named(value="recordIndexWithinBatch")
int recordIndexWithinBatch,
@Named(value="outIndex")
int outIndex)
emitRight in interface NestedLoopJoinpublic abstract void emitLeft(@Named(value="leftIndex")
int leftIndex,
@Named(value="outIndex")
int outIndex)
emitLeft in interface NestedLoopJoinprotected abstract boolean doEval(@Named(value="leftIndex")
int leftIndex,
@Named(value="rightBatchIndex")
int batchIndex,
@Named(value="rightRecordIndexWithinBatch")
int recordIndexWithinBatch)
Copyright © 2022 The Apache Software Foundation. All rights reserved.