com.metamatrix.query.processor.relational
Class MergeJoinStrategy
java.lang.Object
com.metamatrix.query.processor.relational.JoinStrategy
com.metamatrix.query.processor.relational.MergeJoinStrategy
- Direct Known Subclasses:
- NestedLoopJoinStrategy, PartitionedSortJoin
public class MergeJoinStrategy
- extends JoinStrategy
MergeJoinStrategy supports generalized Full, Left Outer, and Inner Joins (containing non-equi join criteria) as long as there
is at least one equi-join criteria
Additionally supports Semi and Anti-Semi Joins. These too allow for generalized non-equi join criteria.
TODO: when there is no non-equi join criteria matching duplicates from the outer side can be output immediately
TODO: semi joins should only output left tuples
Support for Intersect and Except is controlled by the grouping flag, which changes comparisons to check
for null equality.
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sortLeft
protected MergeJoinStrategy.SortOption sortLeft
sortRight
protected MergeJoinStrategy.SortOption sortRight
processingSortLeft
protected MergeJoinStrategy.SortOption processingSortLeft
processingSortRight
protected MergeJoinStrategy.SortOption processingSortRight
MergeJoinStrategy
public MergeJoinStrategy(MergeJoinStrategy.SortOption sortLeft,
MergeJoinStrategy.SortOption sortRight,
boolean grouping)
clone
public java.lang.Object clone()
- Specified by:
clone in class JoinStrategy
- See Also:
JoinStrategy.clone()
initialize
public void initialize(JoinNode joinNode)
throws MetaMatrixComponentException
- Overrides:
initialize in class JoinStrategy
- Throws:
MetaMatrixComponentException- See Also:
JoinStrategy.initialize(com.metamatrix.query.processor.relational.JoinNode)
close
public void close()
throws TupleSourceNotFoundException,
MetaMatrixComponentException
- Overrides:
close in class JoinStrategy
- Throws:
TupleSourceNotFoundException
MetaMatrixComponentException- See Also:
JoinStrategy.close()
nextTuple
protected java.util.List nextTuple()
throws MetaMatrixComponentException,
CriteriaEvaluationException,
MetaMatrixProcessingException
- Specified by:
nextTuple in class JoinStrategy
- Throws:
MetaMatrixComponentException
CriteriaEvaluationException
MetaMatrixProcessingException
compareToPrevious
protected boolean compareToPrevious(com.metamatrix.query.processor.relational.SourceState target)
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
compare
protected int compare(java.util.List leftProbe,
java.util.List rightProbe,
int[] leftExpressionIndecies,
int[] rightExpressionIndecies)
loadLeft
protected void loadLeft()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
loadLeft in class JoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException- See Also:
JoinStrategy.loadLeft()
postLoadLeft
protected void postLoadLeft()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
postLoadLeft in class JoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
postLoadRight
protected void postLoadRight()
throws MetaMatrixComponentException,
MetaMatrixProcessingException
- Overrides:
postLoadRight in class JoinStrategy
- Throws:
MetaMatrixComponentException
MetaMatrixProcessingException
sortRight
protected void sortRight()
throws MetaMatrixComponentException,
TupleSourceNotFoundException,
BlockedOnMemoryException
- Throws:
MetaMatrixComponentException
TupleSourceNotFoundException
BlockedOnMemoryException
setProcessingSortRight
public void setProcessingSortRight(boolean processingSortRight)
getName
public java.lang.String getName()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2009. All Rights Reserved.