com.metamatrix.query.processor.relational
Class PartitionedSortJoin
java.lang.Object
com.metamatrix.query.processor.relational.JoinStrategy
com.metamatrix.query.processor.relational.MergeJoinStrategy
com.metamatrix.query.processor.relational.PartitionedSortJoin
public class PartitionedSortJoin
- extends MergeJoinStrategy
Extends the basic fully sorted merge join to check for conditions necessary
to not fully sort one of the sides
Will be used for inner joins and only if both sorts are not required.
Degrades to a normal merge join if the tuples are balanced.
Field Summary |
static int |
MAX_PARTITIONS
This is a compromise between the max size of the smaller side
and effective partitioning assuming that we only want to hold
two batches in memory during partitioning. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAX_PARTITIONS
public static final int MAX_PARTITIONS
- This is a compromise between the max size of the smaller side
and effective partitioning assuming that we only want to hold
two batches in memory during partitioning.
TODO: apply partitioning recursively and/or have a better mechanism
for buffermanager reserve/release of memory
(would also help the sort utility)
- See Also:
- Constant Field Values
PartitionedSortJoin
public PartitionedSortJoin(MergeJoinStrategy.SortOption sortLeft,
MergeJoinStrategy.SortOption sortRight)
close
public void close()
throws TupleSourceNotFoundException,
MetaMatrixComponentException
- Overrides:
close
in class MergeJoinStrategy
- Throws:
TupleSourceNotFoundException
MetaMatrixComponentException
- See Also:
JoinStrategy.close()
initialize
public void initialize(JoinNode joinNode)
throws MetaMatrixComponentException
- Overrides:
initialize
in class MergeJoinStrategy
- Throws:
MetaMatrixComponentException
- See Also:
JoinStrategy.initialize(com.metamatrix.query.processor.relational.JoinNode)
computeBatchBounds
public void computeBatchBounds(com.metamatrix.query.processor.relational.SourceState state)
throws TupleSourceNotFoundException,
MetaMatrixComponentException
- Throws:
TupleSourceNotFoundException
MetaMatrixComponentException
loadLeft
protected void loadLeft()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
loadLeft
in class MergeJoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
- See Also:
JoinStrategy.loadLeft()
loadRight
protected void loadRight()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
loadRight
in class JoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
postLoadLeft
protected void postLoadLeft()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
postLoadLeft
in class MergeJoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
postLoadRight
protected void postLoadRight()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
postLoadRight
in class MergeJoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
nextTuple
protected java.util.List nextTuple()
throws MetaMatrixComponentException,
CriteriaEvaluationException,
MetaMatrixProcessingException
- Overrides:
nextTuple
in class MergeJoinStrategy
- Throws:
MetaMatrixComponentException
CriteriaEvaluationException
MetaMatrixProcessingException
binarySearch
public int binarySearch(java.util.List<?> tuple,
java.util.List[] tuples,
int[] leftIndexes,
int[] rightIndexes)
clone
public java.lang.Object clone()
- Overrides:
clone
in class MergeJoinStrategy
- See Also:
JoinStrategy.clone()
getName
public java.lang.String getName()
- Overrides:
getName
in class MergeJoinStrategy
Copyright © 2009. All Rights Reserved.