Package io.prestosql.operator
Class TopNOperator
- java.lang.Object
-
- io.prestosql.operator.TopNOperator
-
- All Implemented Interfaces:
WorkProcessorOperator
,WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
,AutoCloseable
public class TopNOperator extends Object implements WorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
Returns the top N rows from the source sorted according to the specified ordering in the keyChannelIndex channel.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInput(Page page)
static OperatorFactory
createOperatorFactory(int operatorId, PlanNodeId planNodeId, List<? extends Type> types, int n, List<Integer> sortChannels, List<SortOrder> sortOrders, TypeOperators typeOperators)
void
finish()
WorkProcessor<Page>
getOutputPages()
boolean
needsInput()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.prestosql.operator.WorkProcessorOperator
close, getOperatorInfo
-
-
-
-
Method Detail
-
createOperatorFactory
public static OperatorFactory createOperatorFactory(int operatorId, PlanNodeId planNodeId, List<? extends Type> types, int n, List<Integer> sortChannels, List<SortOrder> sortOrders, TypeOperators typeOperators)
-
getOutputPages
public WorkProcessor<Page> getOutputPages()
- Specified by:
getOutputPages
in interfaceWorkProcessorOperator
-
needsInput
public boolean needsInput()
- Specified by:
needsInput
in interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
addInput
public void addInput(Page page)
- Specified by:
addInput
in interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
finish
public void finish()
- Specified by:
finish
in interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
-