Package io.trino.operator
Class TopNOperator
- java.lang.Object
-
- io.trino.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 voidaddInput(Page page)static OperatorFactorycreateOperatorFactory(int operatorId, PlanNodeId planNodeId, List<? extends Type> types, int n, List<Integer> sortChannels, List<SortOrder> sortOrders, TypeOperators typeOperators)voidfinish()WorkProcessor<Page>getOutputPages()booleanneedsInput()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.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:
getOutputPagesin interfaceWorkProcessorOperator
-
needsInput
public boolean needsInput()
- Specified by:
needsInputin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
addInput
public void addInput(Page page)
- Specified by:
addInputin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
finish
public void finish()
- Specified by:
finishin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
-