Class LiteralSelector
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.LiteralSelector
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable
Represents a PromQL literal scalar value wrapped as a vector selector.
In PromQL, literal numeric values can be used as instant vectors where each
sample in the result has the same scalar value with no labels. This corresponds
to PromQL syntax like:
42
3.14
-5.5
Examples:
http_requests_total + 10 // Add 10 to each sample
cpu_usage * 100 // Multiply by 100
rate(requests[5m]) > 0.5 // Compare against threshold
The literal selector produces a single-value vector with no labels, allowing
literals to participate in vector operations and binary expressions.
-
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
ConstructorsConstructorDescriptionLiteralSelector(Source source, Literal literal) LiteralSelector(Source source, LogicalPlan child, Literal literal) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected NodeInfo<LiteralSelector> info()literal()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
-
LiteralSelector
-
LiteralSelector
-
-
Method Details
-
literal
-
info
- Specified by:
infoin classNode<LogicalPlan>
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
telemetryLabel
-
equals
-
hashCode
public int hashCode()
-