Class QueryDslTimestampBoundsExtractor

java.lang.Object
org.elasticsearch.xpack.esql.core.querydsl.QueryDslTimestampBoundsExtractor

public final class QueryDslTimestampBoundsExtractor extends Object
Extracts @timestamp bounds from Query DSL filters.

Used by PromQL planning to infer implicit start/end bounds from request filters.

  • Method Details

    • extractTimestampBounds

      @Nullable public static QueryDslTimestampBoundsExtractor.TimestampBounds extractTimestampBounds(@Nullable QueryBuilder filter)
      Extracts the @timestamp range bounds from a query DSL filter.

      Supports:

      Parameters:
      filter - the query DSL filter to inspect, may be null
      Returns:
      extracted bounds, or null when no @timestamp range is found or bounds cannot be parsed
    • extractTimestampBounds

      @Nullable public static QueryDslTimestampBoundsExtractor.TimestampBounds extractTimestampBounds(@Nullable QueryBuilder filter, LongSupplier nowSupplier)
      Extracts the @timestamp range bounds from a query DSL filter using the supplied now value to resolve date math expressions consistently with the current request.