You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One real bug, three consistency/design gaps, one minor inefficiency.
Real bug (asap-planner-rs/src/planner/window.rs:93): apply_windowing_override checks window_size_ms % slide_divisor == 0 but never checks data_range_ms % window_size_ms == 0, which cleanup.rs's Sliding branch requires downstream. A realistic config (rate(x[5m]) at repetition_delay_ms: 45000) passes the override check but fails in cleanup.rs with a differently-worded error that doesn't match the "window_size_ms (" prefix the generators use to aggregate errors — so it aborts on the first bad query instead of collecting all of them, breaking the PR's own "report all invalid queries" feature. Both new test fixtures happen to avoid this case entirely.
Two related design issues in the same aggregation mechanism: the string-prefix match is duplicated across promql/generator.rs:109 and sql/generator.rs:102 with no shared constant, and binary-arm queries (promql/generator.rs:184) bypass the aggregation Vec entirely via ?.
Plus: SQLController::from_file_with_discovery (sql/controller.rs:40) skips windowing.validate() that every other constructor calls, and windowing.validate() runs redundantly up to 4x per plan generation (minor, not a correctness issue).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
windowingoverride for PromQL and SQL planner inputsTesting
Execution-side behavior remains out of scope; this PR only controls planner candidate generation.
Closes #555