Class TopNByExec
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan
org.elasticsearch.xpack.esql.plan.physical.UnaryExec
org.elasticsearch.xpack.esql.plan.physical.TopNByExec
- All Implemented Interfaces:
NamedWriteable,Writeable,EstimatesRowSize
Physical plan node for
SORT order1, order2 | LIMIT N BY grouping1, grouping2, ....
Sorts the input rows retaining at most N rows per group defined by the grouping expressions.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.plan.physical.EstimatesRowSize
EstimatesRowSize.StateNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionTopNByExec(Source source, PhysicalPlan child, List<Order> order, Expression limitPerGroup, List<Expression> groupings, Integer estimatedRowSize) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEstimate of the number of bytes that'll be loaded per position before the stream of pages is consumed.Estimate the number of bytes that'll be loaded per position before the stream of pages is consumed.inthashCode()protected NodeInfo<TopNByExec> info()Normally, you want to use one of the staticcreatemethods to implement this.order()replaceChild(PhysicalPlan newChild) withDocValuesAttributes(Set<Attribute> docValuesAttributes) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.physical.UnaryExec
child, inputSet, output, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, computeReferences, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Field Details
-
ENTRY
-
-
Constructor Details
-
TopNByExec
public TopNByExec(Source source, PhysicalPlan child, List<Order> order, Expression limitPerGroup, List<Expression> groupings, Integer estimatedRowSize)
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods to implement this.For
QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations likeQueryPlan#transformExpressionsOnly(Function)will not have an effect.- Specified by:
infoin classNode<PhysicalPlan>
-
replaceChild
- Specified by:
replaceChildin classUnaryExec
-
withDocValuesAttributes
-
limitPerGroup
-
order
-
groupings
-
docValuesAttributes
-
estimatedRowSize
Estimate of the number of bytes that'll be loaded per position before the stream of pages is consumed. -
estimateRowSize
Description copied from interface:EstimatesRowSizeEstimate the number of bytes that'll be loaded per position before the stream of pages is consumed.- Specified by:
estimateRowSizein interfaceEstimatesRowSize
-
hashCode
public int hashCode() -
equals
-