Class SetOperator
- java.lang.Object
-
- org.apache.pinot.query.runtime.operator.MultiStageOperator
-
- org.apache.pinot.query.runtime.operator.SetOperator
-
- All Implemented Interfaces:
AutoCloseable,Operator<TransferableBlock>
- Direct Known Subclasses:
IntersectOperator,MinusOperator,UnionOperator
public abstract class SetOperator extends MultiStageOperator
Set operator, which supports UNION, INTERSECT and EXCEPT. This has two child operators, and the left child operator is the one that is used to construct the result. The right child operator is used to construct a set of rows that are used to filter the left child operator. The right child operator is consumed in a blocking manner, and the left child operator is consumed in a non-blocking UnionOperator: The right child operator is consumed in a blocking manner.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<Record>_rightRowSet-
Fields inherited from class org.apache.pinot.query.runtime.operator.MultiStageOperator
_context, _opChainStats, _operatorId
-
-
Constructor Summary
Constructors Constructor Description SetOperator(OpChainExecutionContext opChainExecutionContext, List<MultiStageOperator> upstreamOperators, DataSchema dataSchema)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected TransferableBlockconstructResultBlockSet(TransferableBlock leftBlock)protected voidconstructRightBlockSet()voidexplainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int parentId)List<MultiStageOperator>getChildOperators()ExecutionStatisticsgetExecutionStatistics()org.apache.pinot.segment.spi.IndexSegmentgetIndexSegment()protected TransferableBlockgetNextBlock()protected abstract booleanhandleRowMatched(Object[] row)Returns true if the row is matched.voidprepareForExplainPlan(ExplainPlanRows explainPlanRows)-
Methods inherited from class org.apache.pinot.query.runtime.operator.MultiStageOperator
cancel, close, getOperatorId, nextBlock, shouldCollectStats
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.core.common.Operator
toExplainString
-
-
-
-
Constructor Detail
-
SetOperator
public SetOperator(OpChainExecutionContext opChainExecutionContext, List<MultiStageOperator> upstreamOperators, DataSchema dataSchema)
-
-
Method Detail
-
getChildOperators
public List<MultiStageOperator> getChildOperators()
- Specified by:
getChildOperatorsin interfaceOperator<TransferableBlock>- Overrides:
getChildOperatorsin classMultiStageOperator
-
prepareForExplainPlan
public void prepareForExplainPlan(ExplainPlanRows explainPlanRows)
-
explainPlan
public void explainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int parentId)
-
getIndexSegment
public org.apache.pinot.segment.spi.IndexSegment getIndexSegment()
-
getExecutionStatistics
public ExecutionStatistics getExecutionStatistics()
-
getNextBlock
protected TransferableBlock getNextBlock()
- Specified by:
getNextBlockin classMultiStageOperator
-
constructRightBlockSet
protected void constructRightBlockSet()
-
constructResultBlockSet
protected TransferableBlock constructResultBlockSet(TransferableBlock leftBlock)
-
handleRowMatched
protected abstract boolean handleRowMatched(Object[] row)
Returns true if the row is matched. Also updates the right row set based on the Operator.- Parameters:
row-- Returns:
- true if the row is matched.
-
-