Class SampledAggregate
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<LogicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<LogicalPlan>
org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
org.elasticsearch.xpack.esql.plan.logical.Aggregate
org.elasticsearch.xpack.esql.plan.logical.SampledAggregate
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisVerificationAware,TelemetryAware,Resolvable,ExecutesOn,ExecutesOn.Coordinator,PipelineBreaker,SortAgnostic
Aggregate, which upon execution is either:
- sampled with the
sampleProbabilityfor fast execution; or - replaced by an exact aggregate if the
originalAggregatescan be pushed down to Lucene.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.plan.logical.ExecutesOn
ExecutesOn.Coordinator, ExecutesOn.ExecuteLocation, ExecutesOn.RemoteNested 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.plan.logical.Aggregate
aggregates, groupings, lazyOutputFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionSampledAggregate(Source source, LogicalPlan child, List<Expression> groupings, List<? extends NamedExpression> aggregates, List<? extends NamedExpression> originalAggregates, Expression sampleProbability) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()info()Normally, you want to use one of the staticcreatemethods to implement this.List<? extends NamedExpression> replaceChild(LogicalPlan newChild) with(LogicalPlan child, List<Expression> newGroupings, List<? extends NamedExpression> newAggregates) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.Aggregate
aggregates, checkTimeSeriesAggregates, computeReferences, computeReferences, expressionsResolved, groupings, output, output, postAnalysisVerification, telemetryLabel, withMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, inputSet, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
analyzed, childrenResolved, optimized, preAnalyzed, preOptimized, resolved, setAnalyzed, setOptimized, setPreAnalyzed, setPreOptimizedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, 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, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.plan.logical.ExecutesOn.Coordinator
executesOn
-
Field Details
-
ENTRY
-
-
Constructor Details
-
SampledAggregate
public SampledAggregate(Source source, LogicalPlan child, List<Expression> groupings, List<? extends NamedExpression> aggregates, List<? extends NamedExpression> originalAggregates, Expression sampleProbability) -
SampledAggregate
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAggregate- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Overrides:
getWriteableNamein classAggregate
-
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. -
replaceChild
- Overrides:
replaceChildin classAggregate
-
with
public SampledAggregate with(LogicalPlan child, List<Expression> newGroupings, List<? extends NamedExpression> newAggregates) -
originalAggregates
-
sampleProbability
-
hashCode
public int hashCode() -
equals
-