Class InstantSelector
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.selector.Selector
org.elasticsearch.xpack.esql.plan.logical.promql.selector.InstantSelector
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable
Represents a PromQL instant vector selector.
An instant vector selects time series based on metric name and label matchers,
returning the most recent sample at the evaluation timestamp. This corresponds to PromQL syntax:
metric_name{label="value"} offset 5m @ timestamp
Examples:
http_requests_total
cpu_usage{host="web-1"}
memory_used{env=~"prod.*"} offset 10m
up{job="prometheus"} @ 1609746000
The instant vector selects a single sample per matching time series at the
evaluation time (with optional offset/@ modifiers), representing the current state.
Conceptually an instant selector is a range selector with a null range.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested 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.plan.logical.promql.selector.Selector
outputFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionInstantSelector(Source source, Expression series, List<Expression> labels, LabelMatchers labelMatchers, Evaluation evaluation) InstantSelector(Source source, LogicalPlan child, Expression series, List<Expression> labels, LabelMatchers labelMatchers, Evaluation evaluation) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected NodeInfo<InstantSelector> info()replaceChild(LogicalPlan newChild) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.promql.selector.Selector
evaluation, expressionsResolved, getWriteableName, labelMatchers, labels, series, writeToMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, inputSet, output, 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
anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
InstantSelector
public InstantSelector(Source source, Expression series, List<Expression> labels, LabelMatchers labelMatchers, Evaluation evaluation) -
InstantSelector
public InstantSelector(Source source, LogicalPlan child, Expression series, List<Expression> labels, LabelMatchers labelMatchers, Evaluation evaluation)
-
-
Method Details
-
info
- Specified by:
infoin classNode<LogicalPlan>
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
equals
-
hashCode
public int hashCode()
-