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
Modifier and TypeMethodDescriptionvoidstatic OperatorFactorycreateOperatorFactory(int operatorId, PlanNodeId planNodeId, List<? extends Type> types, int n, List<Integer> sortChannels, List<SortOrder> sortOrders, TypeOperators typeOperators) voidfinish()booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.operator.WorkProcessorOperator
close, getMetrics, getOperatorInfo
-
Method Details
-
createOperatorFactory
public static OperatorFactory createOperatorFactory(int operatorId, PlanNodeId planNodeId, List<? extends Type> types, int n, List<Integer> sortChannels, List<SortOrder> sortOrders, TypeOperators typeOperators) -
getOutputPages
- Specified by:
getOutputPagesin interfaceWorkProcessorOperator
-
needsInput
public boolean needsInput()- Specified by:
needsInputin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
addInput
- Specified by:
addInputin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-
finish
public void finish()- Specified by:
finishin interfaceWorkProcessorOperatorAdapter.AdapterWorkProcessorOperator
-