Class EnhancedSortMergeJoinStrategy
- java.lang.Object
-
- org.teiid.query.processor.relational.JoinStrategy
-
- org.teiid.query.processor.relational.MergeJoinStrategy
-
- org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy
-
public class EnhancedSortMergeJoinStrategy 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. Refined in 7.4 to use a full index if it is small enough or a repeated merge, rather than a partitioning approach (which was really just a single level index) TODO: add a tree method for insert that reuses a place list
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.query.processor.relational.MergeJoinStrategy
MergeJoinStrategy.SortOption
-
-
Field Summary
-
Fields inherited from class org.teiid.query.processor.relational.MergeJoinStrategy
processingSortLeft, processingSortRight, singleMatch, sortLeft, sortRight
-
Fields inherited from class org.teiid.query.processor.relational.JoinStrategy
joinNode, leftSource, reserved, rightSource
-
-
Constructor Summary
Constructors Constructor Description EnhancedSortMergeJoinStrategy(MergeJoinStrategy.SortOption sortLeft, MergeJoinStrategy.SortOption sortRight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnhancedSortMergeJoinStrategyclone()voidclose()voidcreateIndex(org.teiid.query.processor.relational.SourceState state, MergeJoinStrategy.SortOption sortOption)Create an index of the smaller sizeStringgetName()protected voidloadLeft()protected voidloadRight()protected voidprocess()voidsetPreferMemCutoff(int cutoff)voidsetSemiDep(boolean semiDep)-
Methods inherited from class org.teiid.query.processor.relational.MergeJoinStrategy
compare, compareToPrevious, compareTuples, initialize, resetMatchState, setProcessingSortLeft, setProcessingSortRight, singleMatch, toString
-
Methods inherited from class org.teiid.query.processor.relational.JoinStrategy
openLeft, openRight, outputTuple
-
-
-
-
Constructor Detail
-
EnhancedSortMergeJoinStrategy
public EnhancedSortMergeJoinStrategy(MergeJoinStrategy.SortOption sortLeft, MergeJoinStrategy.SortOption sortRight)
-
-
Method Detail
-
setPreferMemCutoff
public void setPreferMemCutoff(int cutoff)
-
close
public void close()
- Overrides:
closein classMergeJoinStrategy- See Also:
JoinStrategy.close()
-
createIndex
public void createIndex(org.teiid.query.processor.relational.SourceState state, MergeJoinStrategy.SortOption sortOption) throws TeiidComponentException, TeiidProcessingExceptionCreate an index of the smaller size
-
loadLeft
protected void loadLeft() throws TeiidComponentException, TeiidProcessingException- Overrides:
loadLeftin classMergeJoinStrategy- Throws:
TeiidComponentExceptionTeiidProcessingException
-
loadRight
protected void loadRight() throws TeiidComponentException, TeiidProcessingException- Overrides:
loadRightin classMergeJoinStrategy- Throws:
TeiidComponentExceptionTeiidProcessingException
-
process
protected void process() throws TeiidComponentException, TeiidProcessingException- Overrides:
processin classMergeJoinStrategy- Throws:
TeiidComponentExceptionTeiidProcessingException
-
clone
public EnhancedSortMergeJoinStrategy clone()
- Overrides:
clonein classMergeJoinStrategy- See Also:
JoinStrategy.clone()
-
getName
public String getName()
- Overrides:
getNamein classMergeJoinStrategy
-
setSemiDep
public void setSemiDep(boolean semiDep)
-
-