Skip to content

fix: remove QueryExpr::Window — no producer exists - #193

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
issue-182-remove-window
Aug 14, 2026
Merged

milindsrivastava1997 merged 1 commit into
mainfrom
issue-182-remove-window

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Collaborator

Summary

  • QueryExpr::Window (canonical L3 IR) has no producer: L2→L3 conversion collapses every L2 Window (bare range vector) into TimeRange unconditionally (crates/l2/src/lower.rs). Confirmed empirically by walking every lowered query across all 7 corpora (~2600 queries).
  • Removes the variant, its output_schema arm, WindowKind (its only field type, now itself unused), and every match arm across dag_export, canonicalize's children walker, variant_coverage, and test files.
  • L2's own relational::QueryExpr::Window (a distinct, still-live type) is untouched.
  • Rebased onto fix: remove QueryExpr::Ref / LetBinding — no producer exists #192 (issue Remove QueryExpr::Ref / QueryExpr::LetBinding — no producer exists #181, merged) — that PR renamed output_schema_in(scope) to output_schema() across the same match statement; this PR's diff reflects that.

Fixes #182

Test plan

  • cargo build --workspace --tests
  • cargo test --workspace (full suite green)
  • cargo clippy --workspace --all-targets
  • pre-commit hooks (fmt, check, clippy, test) passed on commit

🤖 Generated with Claude Code

L2→L3 conversion collapses every L2 Window (bare range vector) into
canonical TimeRange unconditionally (crates/l2/src/lower.rs); nothing
ever constructs canonical QueryExpr::Window. Confirmed empirically by
walking every lowered query across all 7 corpora (~2600 queries).

Drops the variant, its output_schema arm, WindowKind (its only field
type, now itself unused), and every match arm across dag_export,
canonicalize's children walker, variant_coverage, and test files.
L2's own relational::QueryExpr::Window (a distinct, still-live type)
is untouched.

Fixes #182

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@milindsrivastava1997
milindsrivastava1997 merged commit 3d2ef3a into main Aug 14, 2026
1 check passed
@milindsrivastava1997
milindsrivastava1997 deleted the issue-182-remove-window branch August 14, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant