Class LeafStageTransferableBlockOperator
- java.lang.Object
-
- org.apache.pinot.query.runtime.operator.MultiStageOperator
-
- org.apache.pinot.query.runtime.operator.LeafStageTransferableBlockOperator
-
- All Implemented Interfaces:
AutoCloseable,Operator<TransferableBlock>
public class LeafStageTransferableBlockOperator extends MultiStageOperator
Leaf-stage transfer block operator is used to wrap around the leaf stage process results. They are passed to the Pinot server to execute query thus only oneDataTablewere returned. However, to conform with the intermediate stage operators. An additionalMetadataBlockneeds to be transferred after the data block.In order to achieve this:
- The leaf-stage result is split into data payload block and metadata payload block.
- In case the leaf-stage result contains error or only metadata, we skip the data payload block.
- Leaf-stage result blocks are in the
DataSchema.getStoredColumnDataTypes()format thus requires canonicalization.
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.query.runtime.operator.MultiStageOperator
_context, _opChainStats, _operatorId
-
-
Constructor Summary
Constructors Constructor Description LeafStageTransferableBlockOperator(OpChainExecutionContext context, List<ServerQueryRequest> requests, DataSchema dataSchema, QueryExecutor queryExecutor, ExecutorService executorService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static voidconvertRow(Object[] row, DataSchema.ColumnDataType[] inputStoredTypes, DataSchema.ColumnDataType[] outputStoredTypes)List<MultiStageOperator>getChildOperators()protected TransferableBlockgetNextBlock()protected booleanshouldCollectStats()Leaf stage operators should always collect stats for the tables used in queries Otherwise the Broker response will just contain zeros for every stat valueStringtoExplainString()-
Methods inherited from class org.apache.pinot.query.runtime.operator.MultiStageOperator
cancel, getOperatorId, nextBlock
-
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
explainPlan, getExecutionStatistics, getIndexSegment, prepareForExplainPlan
-
-
-
-
Constructor Detail
-
LeafStageTransferableBlockOperator
public LeafStageTransferableBlockOperator(OpChainExecutionContext context, List<ServerQueryRequest> requests, DataSchema dataSchema, QueryExecutor queryExecutor, ExecutorService executorService)
-
-
Method Detail
-
getChildOperators
public List<MultiStageOperator> getChildOperators()
- Specified by:
getChildOperatorsin interfaceOperator<TransferableBlock>- Overrides:
getChildOperatorsin classMultiStageOperator
-
toExplainString
public String toExplainString()
-
getNextBlock
protected TransferableBlock getNextBlock()
- Specified by:
getNextBlockin classMultiStageOperator
-
shouldCollectStats
protected boolean shouldCollectStats()
Leaf stage operators should always collect stats for the tables used in queries Otherwise the Broker response will just contain zeros for every stat value- Overrides:
shouldCollectStatsin classMultiStageOperator
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classMultiStageOperator
-
convertRow
public static void convertRow(Object[] row, DataSchema.ColumnDataType[] inputStoredTypes, DataSchema.ColumnDataType[] outputStoredTypes)
-
-