Class IndexedTableJoinMatcher
- java.lang.Object
-
- org.apache.druid.segment.join.table.IndexedTableJoinMatcher
-
- All Implemented Interfaces:
JoinMatcher
public class IndexedTableJoinMatcher extends Object implements JoinMatcher
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnSelectorFactorygetColumnSelectorFactory()Returns a factory for reading columns from theJoinablethat correspond to matched rows.booleanhasMatch()Returns whether the active matcher (JoinMatcher.matchCondition()orJoinMatcher.matchRemainder()) has matched something.voidmatchCondition()booleanmatchingRemainder()Returns whether this matcher is currently matching the remainder (i.e.voidmatchRemainder()Matches every row that has not already been matched.voidnextMatch()Moves on to the next match.voidreset()Clears any active matches.
-
-
-
Method Detail
-
getColumnSelectorFactory
public ColumnSelectorFactory getColumnSelectorFactory()
Description copied from interface:JoinMatcherReturns a factory for reading columns from theJoinablethat correspond to matched rows.- Specified by:
getColumnSelectorFactoryin interfaceJoinMatcher
-
matchCondition
public void matchCondition()
Description copied from interface:JoinMatcherMatches against theColumnSelectorFactoryandJoinConditionAnalysissupplied toJoinable.makeJoinMatcher(org.apache.druid.segment.ColumnSelectorFactory, org.apache.druid.segment.join.JoinConditionAnalysis, boolean, boolean, org.apache.druid.java.util.common.io.Closer). After calling this method,JoinMatcher.hasMatch()will return whether at least one row matched. After reading that row,JoinMatcher.nextMatch()can be used to move on to the next row.- Specified by:
matchConditionin interfaceJoinMatcher
-
matchRemainder
public void matchRemainder()
Description copied from interface:JoinMatcherMatches every row that has not already been matched. Used for right joins. After calling this method,JoinMatcher.hasMatch()will return whether at least one row matched. After reading that row,JoinMatcher.nextMatch()can be used to move on to the next row. Will only work correctly ifJoinable.makeJoinMatcher(org.apache.druid.segment.ColumnSelectorFactory, org.apache.druid.segment.join.JoinConditionAnalysis, boolean, boolean, org.apache.druid.java.util.common.io.Closer)was called withremainderNeeded == true.- Specified by:
matchRemainderin interfaceJoinMatcher
-
matchingRemainder
public boolean matchingRemainder()
Description copied from interface:JoinMatcherReturns whether this matcher is currently matching the remainder (i.e. ifJoinMatcher.matchRemainder()was the most recent match method called).- Specified by:
matchingRemainderin interfaceJoinMatcher
-
hasMatch
public boolean hasMatch()
Description copied from interface:JoinMatcherReturns whether the active matcher (JoinMatcher.matchCondition()orJoinMatcher.matchRemainder()) has matched something.- Specified by:
hasMatchin interfaceJoinMatcher
-
nextMatch
public void nextMatch()
Description copied from interface:JoinMatcherMoves on to the next match. It is only valid to call this ifJoinMatcher.hasMatch()is true.- Specified by:
nextMatchin interfaceJoinMatcher
-
reset
public void reset()
Description copied from interface:JoinMatcherClears any active matches. Does not clear memory about what has been matched in the past.- Specified by:
resetin interfaceJoinMatcher
-
-