public class MergeJoin extends PhysicalJoin
LEFT, RIGHT
tupleCounter
Constructor and Description |
---|
MergeJoin(Operator left,
Operator right,
StorageManager sm,
int leftSlot,
int rightSlot,
Predicate predicate)
Constructs a new mergejoin operator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
Cleans up after the join.
|
protected void |
initTempFiles()
Initialise the temporary files -- if necessary.
|
protected java.util.List<Tuple> |
innerGetNext()
Inner method to propagate a tuple.
|
protected java.util.List<Tuple> |
innerProcessTuple(Tuple tuple,
int inOp)
Inner tuple processing.
|
protected void |
setup()
Sets up this grace hash join operator.
|
protected java.lang.String |
toStringSingle()
Textual representation
|
combineTuples, getPredicate, getStorageManager, setOutputRelation
allDone, getInputOperator, getMultiNext, getNext, getNumberOfInputs, getOutputRelation, prefix, processTuple, setInputs, toString, toString, tuples
public MergeJoin(Operator left, Operator right, StorageManager sm, int leftSlot, int rightSlot, Predicate predicate) throws EngineException
left
- the left input operator.right
- the right input operator.sm
- the storage manager.leftSlot
- pointer to the left sort attribute.rightSlot
- pointer to the right sort attribute.predicate
- the predicate evaluated by this join operator.EngineException
- thrown whenever the operator cannot be
properly constructed.protected void initTempFiles() throws StorageManagerException
StorageManagerException
- thrown whenever the temporary
files cannot be initialised.protected void setup() throws EngineException
setup
in class Operator
EngineException
- thrown whenever there is something
wrong with setting this operator up.protected void cleanup() throws EngineException
cleanup
in class Operator
EngineException
- whenever the operator cannot clean up
after itself.protected java.util.List<Tuple> innerGetNext() throws EngineException
innerGetNext
in class Operator
EngineException
- thrown whenever there is an error in
execution.protected java.util.List<Tuple> innerProcessTuple(Tuple tuple, int inOp) throws EngineException
innerProcessTuple
in class Operator
tuple
- the tuple to be processed.inOp
- the index of the input operator the tuple to be
processed belongs to.EngineException
- thrown whenever there is something wrong
with processing the tuple.protected java.lang.String toStringSingle()
toStringSingle
in class Operator