Class AcrossSeriesAggregate
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.promql.PromqlFunctionCall
org.elasticsearch.xpack.esql.plan.logical.promql.AcrossSeriesAggregate
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,PromqlPlan
Represents a PromQL aggregate function call that operates across multiple time series.
These functions aggregate elements from multiple time series into a single result vector, optionally grouping by specific labels. This corresponds to PromQL syntax:
function_name(instant_vector) [without|by (label_list)]Examples:
sum(http_requests_total) sum(rate(http_requests_total[5m])) avg(cpu_usage) by (host, env) max(response_time) without (instance)These functions reduce the number of time series by aggregating values across series that share the same grouping labels (or all series if no grouping is specified).
-
Nested Class Summary
Nested ClassesNested 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.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionAcrossSeriesAggregate(Source source, LogicalPlan child, String functionName, List<Expression> parameters, AcrossSeriesAggregate.Grouping grouping, List<Attribute> groupings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleangrouping()inthashCode()protected NodeInfo<PromqlFunctionCall> info()Normally, you want to use one of the staticcreatemethods to implement this.output()WITHOUTuses a dynamic_timeseriesoutput because the concrete retained labels are not known until lowering time.replaceChild(LogicalPlan newChild) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.promql.PromqlFunctionCall
functionName, getWriteableName, parameters, returnType, writeToMethods 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, 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
-
Constructor Details
-
AcrossSeriesAggregate
public AcrossSeriesAggregate(Source source, LogicalPlan child, String functionName, List<Expression> parameters, AcrossSeriesAggregate.Grouping grouping, List<Attribute> groupings)
-
-
Method Details
-
grouping
-
groupings
-
expressionsResolved
public boolean expressionsResolved()- Overrides:
expressionsResolvedin classPromqlFunctionCall
-
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<LogicalPlan>
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
equals
- Overrides:
equalsin classPromqlFunctionCall
-
output
WITHOUTuses a dynamic_timeseriesoutput because the concrete retained labels are not known until lowering time.BYandNONEexport concrete labels or nothing.- Specified by:
outputin interfacePromqlPlan- Overrides:
outputin classPromqlFunctionCall
-
hashCode
public int hashCode()- Overrides:
hashCodein classPromqlFunctionCall
-
functionType
- Specified by:
functionTypein classPromqlFunctionCall
-