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
These can be specified in the PROMQL command like so:
     # 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 Details

    • PromqlParams

      public PromqlParams(Source source, Instant start, Instant end, Duration step)
      Creates an instance of a PromqlParams record class.
      Parameters:
      source - the value for the source record component
      start - the value for the start record component
      end - the value for the end record component
      step - the value for the step record component
  • Method Details

    • startLiteral

      public Literal startLiteral()
    • endLiteral

      public Literal endLiteral()
    • stepLiteral

      public Literal stepLiteral()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • source

      public Source source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • start

      public Instant start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public Instant end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • step

      public Duration step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component