Skip to content

Commit f7bee86

Browse files
committed
Merge branch 'test/workload-statistics' into test/accuracy-evidence
2 parents a64f664 + 4e09c61 commit f7bee86

1 file changed

Lines changed: 11 additions & 25 deletions

File tree

‎control_plane/src/physical/compiler.rs‎

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7068,40 +7068,26 @@ pub(crate) mod tests {
70687068
interval: RepetitionInterval(45_000),
70697069
evaluation_phase: planner_types::workload::TimestampMs(0),
70707070
};
7071-
let mut right = snapshot.clone();
7072-
right.query_workload.repeating_queries.as_mut().unwrap()[0].query =
7073-
Query("sum_over_time(n[1m])".into());
7074-
let (mut request, env) = snapshot.into_physical_compilation_request().unwrap();
7075-
let (right, _) = right.into_physical_compilation_request().unwrap();
7076-
// These are independent query outputs. Adding an approximate quantile
7077-
// to an exact sum would require a separate composed accuracy proof.
7078-
let mut raw_query = right.queries[0].clone();
7079-
raw_query.query_id = "raw-query".into();
7080-
request.queries.push(raw_query);
7081-
request
7071+
// Keep both outputs independent: composing a quantile with a sum would
7072+
// require an additional accuracy proof unrelated to cadence selection.
7073+
let mut raw_entry = entry.clone();
7074+
raw_entry.query = Query("sum_over_time(n[1m])".into());
7075+
snapshot
70827076
.query_workload
7083-
.as_mut()
7084-
.unwrap()
70857077
.repeating_queries
70867078
.as_mut()
70877079
.unwrap()
7088-
.push(
7089-
right
7090-
.query_workload
7091-
.unwrap()
7092-
.repeating_queries
7093-
.unwrap()
7094-
.remove(0),
7095-
);
7096-
prepare_window_implementations(&mut request.queries[0], &model, env.target, 0).unwrap();
7097-
request.queries[0]
7098-
.window_realization_candidates
7099-
.retain(|candidate| {
7080+
.push(raw_entry);
7081+
let (mut request, env) = snapshot.into_physical_compilation_request().unwrap();
7082+
for query in &mut request.queries {
7083+
prepare_window_implementations(query, &model, env.target, 0).unwrap();
7084+
query.window_realization_candidates.retain(|candidate| {
71007085
matches!(
71017086
candidate.layout,
71027087
asap_types::WindowMaterializationLayout::Pane { .. }
71037088
)
71047089
});
7090+
}
71057091
let plan = DeploymentPlanCompiler.compile_promql(request, env).unwrap();
71067092
assert!(plan
71077093
.precompute_plan

0 commit comments

Comments
 (0)