Class QueryDslTimestampBoundsExtractor
java.lang.Object
org.elasticsearch.xpack.esql.core.querydsl.QueryDslTimestampBoundsExtractor
Extracts
@timestamp bounds from Query DSL filters.
Used by PromQL planning to infer implicit start/end bounds from request filters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents the@timestamplower and upper bounds extracted from a query DSL filter. -
Method Summary
Modifier and TypeMethodDescriptionextractTimestampBounds(QueryBuilder filter) Extracts the@timestamprange bounds from a query DSL filter.extractTimestampBounds(QueryBuilder filter, LongSupplier nowSupplier) Extracts the@timestamprange bounds from a query DSL filter using the suppliednowvalue to resolve date math expressions consistently with the current request.
-
Method Details
-
extractTimestampBounds
@Nullable public static QueryDslTimestampBoundsExtractor.TimestampBounds extractTimestampBounds(@Nullable QueryBuilder filter) Extracts the@timestamprange bounds from a query DSL filter.Supports:
RangeQueryBuilderdirectly on@timestampBoolQueryBuilderwith the range nested infilterormustclauses
- Parameters:
filter- the query DSL filter to inspect, may benull- Returns:
- extracted bounds, or
nullwhen no@timestamprange is found or bounds cannot be parsed
-
extractTimestampBounds
@Nullable public static QueryDslTimestampBoundsExtractor.TimestampBounds extractTimestampBounds(@Nullable QueryBuilder filter, LongSupplier nowSupplier) Extracts the@timestamprange bounds from a query DSL filter using the suppliednowvalue to resolve date math expressions consistently with the current request.
-