Problem
data_range_ms = None currently carries two meanings: "spatial-only query" and "any window is compatible." The planner (fixed in #421) now always sets data_range_ms = Some(scrape_interval_ms) for spatial-only queries, making None explicit at the source. The query engine still produces None for spatial-only queries, leaving the implicit fallback alive in two places.
Callsites to fix
asap-query-engine/src/engines/simple_engine/promql.rs:1047
Calls build_query_requirements_promql(...) and passes the result directly to find_compatible_aggregation. For OnlySpatial queries, data_range_ms is None. Needs scrape_interval_ms threaded in and applied as an override after the call (same pattern as the planner fix).
asap-query-engine/src/engines/simple_engine/sql.rs:301
Sets data_range_ms = None for QueryPatternType::OnlySpatial explicitly. Needs scrape_interval_ms available at that point and Some(scrape_interval_ms) instead of None.
asap-common/dependencies/rs/asap_types/src/capability_matching.rs:69
window_compatible returns true unconditionally for None. Once both query-engine callsites above are fixed and None is never passed, this branch and the Option<u64> parameter can be changed to u64.
End state
QueryRequirements::data_range_ms changes from Option<u64> to u64, and None has no meaning anywhere in the system.
Problem
data_range_ms = Nonecurrently carries two meanings: "spatial-only query" and "any window is compatible." The planner (fixed in #421) now always setsdata_range_ms = Some(scrape_interval_ms)for spatial-only queries, makingNoneexplicit at the source. The query engine still producesNonefor spatial-only queries, leaving the implicit fallback alive in two places.Callsites to fix
asap-query-engine/src/engines/simple_engine/promql.rs:1047Calls
build_query_requirements_promql(...)and passes the result directly tofind_compatible_aggregation. ForOnlySpatialqueries,data_range_msisNone. Needsscrape_interval_msthreaded in and applied as an override after the call (same pattern as the planner fix).asap-query-engine/src/engines/simple_engine/sql.rs:301Sets
data_range_ms = NoneforQueryPatternType::OnlySpatialexplicitly. Needsscrape_interval_msavailable at that point andSome(scrape_interval_ms)instead ofNone.asap-common/dependencies/rs/asap_types/src/capability_matching.rs:69window_compatiblereturnstrueunconditionally forNone. Once both query-engine callsites above are fixed andNoneis never passed, this branch and theOption<u64>parameter can be changed tou64.End state
QueryRequirements::data_range_mschanges fromOption<u64>tou64, andNonehas no meaning anywhere in the system.