Record Class LogicalPlanBuilder.PromqlParams
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.parser.LogicalPlanBuilder.PromqlParams
- Enclosing class:
LogicalPlanBuilder
public static record LogicalPlanBuilder.PromqlParams(Source source, Instant start, Instant end, Duration step)
extends Record
Container for PromQL command parameters:
- time for instant queries
- start, end, step for range queries
# instant query
PROMQL time "2025-10-31T00:00:00Z" (avg(foo))
# range query with explicit start and end
PROMQL start "2025-10-31T00:00:00Z" end "2025-10-31T01:00:00Z" step 1m (avg(foo))
# range query with implicit time bounds, doesn't support calling start() or end() functions
PROMQL step 5m (avg(foo))
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPromqlParams(Source source, Instant start, Instant end, Duration step) Creates an instance of aPromqlParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.start()Returns the value of thestartrecord component.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PromqlParams
Creates an instance of aPromqlParamsrecord class.- Parameters:
source- the value for thesourcerecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentstep- the value for thesteprecord component
-
-
Method Details
-
startLiteral
-
endLiteral
-
stepLiteral
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-