Skip to content

Support sliding window candidates in the query engine (execution) #557

Description

@milindsrivastava1997

Sub-issue of #554.

Scope: actually serving queries correctly against sliding-window aggregations — the execution-side work, separate from generating valid candidates (#554's other sub-issue, #556).

Concretely:

  • Relax capability_matching.rs's window_compatible() Sliding rule beyond exact-match (data_range_ms == window_size_ms) to allow data_range_ms a multiple of window_size_ms, mirroring Tumbling's existing rule.
  • Implement merge (mergeable sketch types) / subtract (subtractable types) across multiple stored sliding-window buckets in simple_engine's query-serving path (create_store_query_plan/execute_and_merge_store_queries in simple_engine/mod.rs, which today unconditionally does a single exact-match lookup for Sliding and explicitly skips merging).
  • Update planner/cleanup.rs's WindowType::Sliding branch to be window-count-aware instead of hardcoding read_count_threshold = 1.
  • Resolve the epoch/slide-interval alignment question for exact-match lookups (align_end_timestamp_promql only aligns to the scrape interval, not the aggregation's slide_interval_ms).
  • Owns the end-to-end correctness test (plan → run → query a sliding-window aggregation → assert correct results) — Manual windowing override (tumbling/sliding) in config.yaml #555 explicitly defers this test here.

Needs its own design session — not scoped further here. See #554 and the design docs linked there for context.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions