Skip to content

Remove QueryExpr::Window (ψ) — no producer exists, PromQL ranges always collapse to TimeRange #182

Description

@milindsrivastava1997

Summary

QueryExpr::Window (crates/ir/src/intent_algebra/query_expr.rs:595) is documented as "tumbling / sliding / session window over the time axis" for streaming query-repetition semantics. Grepped every constructor of it across the workspace (not just consumers/match-arms) — there isn't one.

The only path that could produce it is L2→L3 conversion, and crates/l2/src/lower.rs:353 collapses it unconditionally:

// Standalone L2 Window (bare range vector `m[5m]` not inside a
// recognized single-stat Aggregate): map to TimeRange.
LQueryExpr::Window { duration, input, .. } => CQueryExpr::TimeRange { .. }

Issue #179 independently confirmed the same thing while reviewing convert's match arms: "this mapping is unconditional — convert never produces canonical's streaming Window variant at all, so there's no context-dependent disambiguation happening here, contrary to an earlier assumption in review."

Confirmed empirically too: lowered every query across all 7 corpora (~2600 queries, 4 PromQL + 3 SQL) and walked every resulting tree — Window never appears, and by the above it structurally can't.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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