Repository navigation
refactor: define every stage's interfaces from #1207 and delete the ones they replace (#1207 PR 0) - #1226
refactor: define every stage's interfaces from #1207 and delete the ones they replace (#1207 PR 0)#1226zzylol wants to merge 11 commits into
Conversation
4772efb to
f57ae08
Compare
|
Per-file test deletions in #1226 (origin/main → PR head).
Restored in the 2026-11-06 revision through the test-only |
…nes they replace (#1207 PR 0)
f57ae08 to
2966355
Compare
…iming, lifetime }
Deletes Schedule and the σ-only InvalidPhysicalProperties variants; the only
invalid combination left is (IngestionTime, OneEvaluation). satisfies_physical
checks timing x lifetime only; delivers_on is the per-context alignment check
(w | I and w | φ). A OneEvaluation result runs in one evaluation context, so
x_{κ,v} covers it as for ℓ = None.
…physical drops memo InvalidLogicalProperties gains SketchBuildWithoutParameters and renames FloorNotInParameterList to ParametersNotInList, returned by LogicalProperties::new. LogicalRequirement::new no longer checks list membership (a floor is any value of the family's parameter type, e.g. heap_size >= k), so it returns Self. satisfies_physical takes only the producer and consumer.
Context::QueryEvaluation(QueryId) becomes Context::Evaluation(EvaluationSchedule):
queries with the same (interval, phase) are evaluated together and share
their OneEvaluation results. evaluation_schedule returns that schedule.
QueryId stays for z_{q,v}. A non-periodic query has no context yet.
InvalidLogicalProperties -> LogicalPropertiesError, InvalidPhysicalProperties -> PhysicalPropertiesError, LogicalRequirement -> LogicalRequirements (parameter_floor -> parameter_floor_for_required_accuracy), satisfies_logical / satisfies_physical -> producer_satisfies_logical_requirements / producer_satisfies_physical_requirements, Medium -> StorageMedium, Context / ContextId -> ExecutionContext / ExecutionContextId (x_in_context / y_in_context -> x_in_execution_context / y_in_execution_context). PhysicalCandidate and PhysicalCandidateKey fields -> logical_candidate_id, physical_properties; edge fields -> producer_candidate_id, consumer_candidate_id; PhysicalASAPMemoCandidates fields -> logical_candidates, physical_candidates.
Deletes EvaluationSchedule and ExecutionContext::evaluation_schedule. An
evaluation context is Evaluation { recurrence, range_evaluation }: queries
with equal ones share it and its OneEvaluation results, one-off queries
included. ExecutionContext, ExecutionContextId and RefreshWindowId move to
asap_types::stages so PhysicalCandidate::delivers_on can take the context.
Contexts are deduplicated by equality (QueryRecurrence holds an f64).
PhysicalASAPDAGValidationError::InvalidPhysicalProperties becomes
PhysicalProperties { node, reason }. In the files this unit edits, "kept"
describing a materialized result or retained data becomes "materialized"
or "retained" (cost, materialized views, realizer, installable plan,
deployment capabilities; locals kept/raw_kept_rows -> retained/
raw_retained_rows), and "reader" becomes "query" where it is a query
(execution demand, ScheduleGroup::queries, cost usage, labels, tests) or
"consumer" where it is a consuming candidate.
find_or_add_group returns the node rules' SchemaDerivationError and add_candidate a CandidateError (the node rules, or an output that differs from the group's). Bodies stay todo!() until PR 2.
…mo (#1207 PR 0) Memo::groups is private, read through groups(); groups are added only through find_or_add_group and queries through add_query (todo!() until PR 2). memo_of_queries returns Result and its body is todo!() until PR 2, which builds Stage 0 on find_or_add_group; Stage 0's node-level CSE (cse.rs), its test_support export and the dead share_identical helper are deleted.
…nd (#1207 PR 0) MemoGroup holds expression: Operator<MemoGroupId> (its input groups are its children), the schema and result kind derived when it is added, parents, queries and candidates; logical_node and child_groups are deleted. Memo::logical_node_trees rebuilds node trees on demand for the code that still reads them (Pass 1 target discovery, devtools labels); todo!() until PR 2.
Why
The memo, the properties, the edges and the Stage 3 variables of the optimization formulation have no named home in today's code:
root_nodechain, sized for a budget share (accuracy_budget_parts);Materializationenum;ProducerCandidatessets;#1207's new order (rewritten 2026-11-06) is interfaces first. This PR defines every data structure and interface of the concepts doc
memo-groups-properties-requirements.md(sections 3–5, #1224 at afee671/f3687a055), withtodo!()bodies. It also deletes the old interfaces and the code they replace. Each later PR fills in one stage behind these interfaces, so no PR needs an adapter between an old interface and a new one.What
Types (
asap-types). It adds every type and signature of the doc's section 3, and the section 4–5 types that Stage 3 uses:Memo, with candidates inMemoGroup::candidates;CandidateExpression,LogicalProperties,WindowLayout,LogicalRequirements,ErrorPropagation,parameter_list,producer_satisfies_logical_requirements;LogicalEdge,LogicalASAPMemoCandidates { memo, edges };PhysicalProperties { timing, lifetime },Lifetime,StorageMedium. There is no schedule property σ (decided 2026-11-06): aNoneorOneEvaluationresult runs when the context that runs it runs, and every tumbling grid is anchored at phase 0;PhysicalCandidate { logical_candidate_id, physical_properties },PhysicalCandidate::delivers_on(memo, context),producer_satisfies_physical_requirements;ExecutionContext,ExecutionContextId,RefreshWindowId(inasap_types::stages, sodelivers_oncan take the context);PhysicalEdge,PhysicalCandidateKey,PhysicalASAPMemoCandidates::{edges, admissible_edges_into, admissible_edges_out_of};SelectedEdge::input_index_of_consumer.Accessors are real code. Every function the doc assigns to PRs 1–8 is
todo!().Stage 0 is
memo_of_queries(wasgenerate_dag_of_logical_memo_groups). It returns aMemowhose candidate lists are empty;DagOfLogicalMemoGroupsis deleted. The hash-consing code is unchanged.θ is out of the operator (decided 2026-11-06).
FieldDataType::Sketchis nowSketch(SketchAlgorithm, GroupingStrategy)(wasSketch(SketchKind, GroupingStrategy)).ASAPOp::SummaryAgg's andSummaryTumblingWindowChain'sfamilycarries only the family, so k=200 and k=345 hash-cons to one group. θ lives only inLogicalProperties::parameters.todo!()for the PR that brings θ from the candidate: the cost's state shape (PR 6), the executor's sketch factory and checks (PR 6), and the accuracy model's per-node sketch guarantee (PR 4).GroupingStrategy::SharedMultiSubpopulationis now{ kind: HydraKind }(was{ kind, params: HydraParams }), and the sizes areSketchParams::Hydra(HydraParams). Two Hydra sizes hash-cons to one group.HydraParams::per_subpopulationgives the per-subpopulation sketch's θ, which the error model and the state shape read.SketchKind(family + θ) stays as a value type: the executor's sketch factory pairs the family with the node'sparametersto configure weighted frequency.Stage 1.
pass1_memo(...) -> Result<Memo, Pass1Error>(decided 2026-11-06; wasgenerate_per_computation_logical_memo_candidatesandPerComputationLogicalMemoCandidatesError), andPlanningRun::pass1_memoholds itsMemo(wasper_computation_candidates).PerComputationLogicalMemoCandidatesand Pass 1's pruned list are deleted; showing what Pass 1 leaves out moves to DAG viewer / stage_pipeline: print memo candidates with properties, every producer–consumer edge with its feasibility and rejection reason, and every stage’s pruned candidates #1205. It still computes its targets, then reachestodo!()(PR 3) where it would add candidates.fn(&mut Memo) -> Result<(), Pass2RuleError>, eachtodo!()(PR 4), then reachestodo!()for the logical edges.Stage 2.
generate_physical_asap_memo_candidatesistodo!()(PR 5) andStage2AssignmentRealizer::realizeistodo!()(PR 6). Everything else in the crate (catalog, timing split, reference pricer) is deleted.Stage 3.
milp/model.rsholds:SelectionVariables { x, y, z, t }and the constraint functions (A)–(F);ExecutionContextVariables(retention_constraints(R);AccuracyVariables(accuracy_constraints(K).select_planvalidates the cost inputs, then reachestodo!()(PR 6). The feat(plan-selection): group selection MILP over execution contexts as Stage 3's default search (#1095) #1144 MILP is deleted, with its groups, cost terms, warm start, completion, decode, LP diagnosis, checks and accuracy binding.h/need/ (R). An edge's retention need is the time horizon the queries it serves read: a 5m range over 10 s windows needs 30 windows. It is a constant per edge, so (R) is linear. Query latency is ignored until the latency design: a result counts as read when its evaluation starts. PR 7, which implements (R), repeats this.Realizer and export (decided 2026-11-06). The only way to export a plan is
AssignmentRealizer::realize(&self, physical: &PhysicalASAPMemoCandidates, selected: &DagOfSelectedCandidates) -> Result<RealizedPlan, PhysicalCandidateError>.RealizedPlan::plan.dagis thePhysicalASAPDAG, built directly, with each node's properties read from itsPhysicalCandidate.Stage2AssignmentRealizer::realizeistodo!()(PR 6).compile_physical_asap_dag,compile_physical_asap_workload(_with_node_ids),PhysicalASAPDAGCompilation,PhysicalASAPNodeIdentityMap,PhysicalASAPDAG::with_every_node_at_query_time,ReferencePlanError,PlanOutput::physical_asap_dag, andasap_planner::test_support::query_time_reference(with thetest-supportfeature).installable_plan_ofnow takes the&RealizedPlan. Its tumbling-window expansion andplan_installablearetodo!()(PR 6).ExecutionDataStateError(the timing pass's error) is deleted.lifetimein place ofmaterialization, and θ asPhysicalASAPDAGNode::parameters: Option<SketchParams>(decided 2026-11-06): the build's candidate'sLogicalProperties::parameters,Noneon every other node. PR 0 defines the field; PR 6's realizer fills it.INSTALLABLE_PLAN_WIRE_VERSIONis 13. The backend changes with PR 6.create_planner_accumulator(family, parameters: Option<&SketchParams>, input, grouping), which refuses a sketch build withNone. The θ checks and kernels not wired to it yet staytodo!()(PR 6).expand_tumbling_window_chains_in_workloadis deleted (decided 2026-11-06): PR 6's realizer expands the realized DAG's chains. Its helperstumbling_windowandshiftedare now#[cfg(any(test, feature = "test-support"))], because only tests call them.PhysicalASAPDAGdirectly (decided 2026-11-06). The test-onlyasap_types::test_support::physical_asap_dag_at_query_time(root)andphysical_asap_dag_at_query_time_with_node_ids(roots)export hand-built operator roots with every node at query time, not materialized and withparameters: None. Executor, runtime-install and frontend end-to-end tests use them instead of the deleted roots-based export.Tools.
stage_pipeline --textand the viewer document print groups. Their candidate, physical and selection sections aretodo!()(PR 9, DAG viewer / stage_pipeline: print memo candidates with properties, every producer–consumer edge with its feasibility and rejection reason, and every stage’s pruned candidates #1205).memo_pricing,--price-enumerated, the fuzz tester's exhaustive search and witness pricing) is deleted.New abstractions not in #1207 or the doc (pending approval)
parameter_listandPhysicalCandidate::delivers_onare in the doc and approved, so they are not listed here.LogicalPropertiesError::{ParametersOfAnotherFamily, ParametersOnExactOperator, WindowOnOperatorThatCannotBeWindowed, ZeroWindowWidth}types/src/stages/candidates.rsLogicalProperties::new.LogicalPropertiesError::{SketchBuildWithoutParameters, ParametersNotInList}(ParametersNotInListwasFloorNotInParameterList)parameter_list.LogicalRequirements::new(parameter_floor_for_required_accuracy) -> Self(was-> Result<Self, LogicalPropertiesError>)newhas nothing to reject.PhysicalPropertiesError::OneEvaluationAtIngestiontypes/src/physical/properties.rsQueryId(pub usize)(plan-selection/src/milp/model.rs),RefreshWindowId(pub usize)(types/src/stages/physical/execution_context.rs)SelectionVariables::z(QueryIdandExecutionContextnamesRefreshWindowId, but the doc does not define them. They index the workload's queries and its ingestion refresh windows.ExecutionContext::Evaluation { recurrence: QueryRecurrence, range_evaluation: Option<RangeEvaluation> }(wasQueryEvaluation(QueryId));EvaluationScheduleandevaluation_schedule()deletedtypes/src/stages/physical/execution_context.rs(moved fromplan-selection/src/milp/model.rs)invocations).QueryRecurrenceholds anf64, so contexts are deduplicated by equality andExecutionContextIdindexes the distinct contexts; noHash. Moved toasap_typesbecausePhysicalCandidate::delivers_ontakes it.PhysicalASAPDAGValidationError::PhysicalProperties { node, reason }(wasInvalidPhysicalProperties)types/src/ir/physical_export.rsPhysicalPropertiesErrorreason.ExecutionContextVariables { x_materialized, x_in_execution_context, y_in_execution_context, retention_amount }plan-selection/src/milp/model.rsSelectionVariablesso thatAccuracyVariables { error_bound, error_bound_of_input, failure_probability, failure_probability_of_input }retention_constraints,accuracy_constraintsand the constraint function signatures(&PhysicalASAPMemoCandidates, &…Variables) -> Vec<good_lp::Constraint>#![allow(dead_code)]onmilp/model.rsselect_plandoes not build the MILP until PR 6, so nothing calls these yet. PR 6 removes the allowance.PhysicalASAPMemoCandidates::new(logical, candidates, query_roots, edges)and its private fieldsedges,admissible_edges_into_input,admissible_edges_out_of_candidatetypes/src/stages/physical/memo_candidates.rsedges()". The accessors return slices, so the indexes must be stored, and private fields need a constructor.PhysicalCandidateKey { logical_candidate_id, physical_properties }ErrorGeneratingPhysicalASAPMemoCandidates(one variant,Pruning(String))physical-asap-optimization/src/catalog/mod.rsPass2RuleError::{InvalidGroupReference, TooManyGroups, CyclicDependencies}logical-asap-optimization/src/pass2/memo/rules.rsPass2RuleError. These are the existing variants that do not name deleted rules.PhysicalASAPDAGNode::lifetimereplacesmaterialization(wire version 11 → 13, withparametersbelow)types/src/ir/physical_export.rsMaterializationis deleted, and the doc says the export writes timing and lifetime per node.materialized_tumbling_window_chains(waskept_tumbling_window_chains)cost/src/lib.rsScheduleGroup::queries(wasreaders), and thequeriesargument ofschedule_groups/evaluation_ratecost/src/execution_demand.rsPlanningReportlosesoperator_nodesandphysical_producer_linksplanner/src/run.rsmemo_of_queries(wasgenerate_dag_of_logical_memo_groups)logical-asap-optimization/src/stage0.rsFieldDataType::Sketch(SketchAlgorithm, GroupingStrategy)(wasSketch(SketchKind, …))types/src/ir/schema/mod.rsinstallable_plan_of(realized: &RealizedPlan, selection, entries)(was(roots, selection, tumbling_window_retention_ms, entries))planner/src/installable.rs#[allow(dead_code)]on the θ-based error model:estimators::sketch_guarantee,estimators::size_params,sizing::default_size_params,hll::classic_guarantee,univmon::{distinct_guarantee, incomplete_top_layer_statistic}accuracy/src/pass1_memo,Pass1Error,PlanningRun::pass1_memo(weregenerate_per_computation_logical_memo_candidates,PerComputationLogicalMemoCandidatesError,PlanningRun::per_computation_candidates)planner/src/run.rsMemo.expand_tumbling_window_chains_in_workloaddeletedtypes/src/ir/operator/tumbling_window_chain.rsPhysicalASAPDAGNode::parameters: Option<SketchParams>(wire version 12 → 13)types/src/ir/physical_export.rsSketchParams::Hydra(HydraParams);GroupingStrategy::SharedMultiSubpopulation { kind }(losesparams)types/src/ir/schema/sketch.rsHydravariant wrappingHydraParams, rather than one variant per Hydra kind) is mine.HydraParams::per_subpopulation(&self) -> SketchParamssketch_guarantee) and the state shape (sketch_shape) read the emulated per-subpopulation sketch's θ, whichGroupingStrategyused to carry.create_planner_accumulator(family, parameters: Option<&SketchParams>, input, grouping)(gainsparameters)executor/src/summary_kernels/factory.rsparameters.asap_types::test_support::{physical_asap_dag_at_query_time, physical_asap_dag_at_query_time_with_node_ids}(featuretest-support)types/src/test_support.rs,types/src/ir/physical_export.rsPhysicalASAPDAGdirectly (decided 2026-11-06). Every node at query time,Lifetime::None,parameters: None.#[cfg(any(test, feature = "test-support"))]ontumbling_window_chain::{tumbling_window, shifted}and onphysical_export::grouping_compatibilitytypes/src/ir/#[allow(dead_code)]oncapability::valid_matrixandGroupStates::Keyedexecutor/src/todo!()until PR 6.Ambiguities and questions
The 2026-11-06 answers are applied above: θ out of the operator, Pass 1 returns
Memo, export viarealize,memo_of_queries,x_materialized, Hydra sizes as θ, θ on the wire, the Pass 1 renames, deletingexpand_tumbling_window_chains_in_workload, and tests that buildPhysicalASAPDAGdirectly. The schedule σ is dropped (decided 2026-11-06):Scheduleand its error variants are deleted,producer_satisfies_physical_requirementschecks timing x lifetime only, anddelivers_onis Stage 3's per-context alignment check. Also decided 2026-11-06: the renames agreed in review (#1224):LogicalPropertiesError,PhysicalPropertiesError,LogicalRequirements(parameter_floor_for_required_accuracy),producer_satisfies_logical_requirements,producer_satisfies_physical_requirements,StorageMedium,ExecutionContext/ExecutionContextId(x_in_execution_context,y_in_execution_context), and the fieldslogical_candidate_id,physical_properties,producer_candidate_id,consumer_candidate_id,logical_candidates,physical_candidates; a sketch build needs θ from its family's list; a requirement's floor may be outside the list;producer_satisfies_physical_requirementstakes only the producer and consumer; an evaluation context is the workload's recurrence and range evaluation (ExecutionContext::Evaluation { recurrence, range_evaluation }), one-off queries included. No open questions; the items marked "pending" in the table above await approval.Key code interfaces
All items below are new, except where marked:
MemoGroupgainscandidates.Memolosescandidates.CandidateForMemoGroupIdmoved here fromstages/physical/memo_candidates.rs.OriginOfCandidateForMemoGrouplosesSharedBuildandSummaryResult.Memo::topological_orderis unchanged in signature and reads the expressions' children.ExecutionTimingis the existing enum, re-exported fromphysical::properties.AssignmentRealizerandRealizedPlanare unchanged;realizeis now the only export path.Function bodies are shown as
;. The bodies of the functions the doc assigns to PRs 1–8 aretodo!()in the code.crates/types/src/stages/memo.rscrates/types/src/stages/candidates.rscrates/types/src/stages/logical_memo_candidates.rscrates/types/src/physical/properties.rscrates/types/src/stages/physical/memo_candidates.rscrates/types/src/stages/realizer.rscrates/types/src/stages/physical/execution_context.rs(new)crates/plan-selection/src/milp/model.rscrates/logical-asap-optimization/src/pass2/memo/rules.rscrates/types/src/ir/schema/mod.rs(excerpt)crates/types/src/ir/physical_export.rs(excerpt)crates/types/src/ir/schema/sketch.rs(excerpt)crates/executor/src/summary_kernels/factory.rsandcrates/types/src/test_support.rs(excerpts)Usage: not applicable yet. Every planning path reaches a
todo!()(Pass 1 first). The first end-to-end usage example comes with PR 6.Major algorithm changes
None added. Algorithms are deleted (see "Deleted"); later PRs re-implement them behind these interfaces.
Before this PR
The memo held private operator chains (
root_node+input_groups) whose summaries carried θ in the operator, sized per budget share. Pass 2 copied consumers for shared builds and per-size groups. Stage 2 enumeratedMaterializationper operator node with interned producer sets. The #1144 MILP selected one candidate per result slot and context, with implicit edges. Export compiled any operator roots against a side map of physical properties.After this PR
Every type and signature of the concepts doc's sections 3–5 exists with the doc's names:
LogicalProperties;Memo;AssignmentRealizer::realize.None of the old interfaces it replaces remains. Planning panics at the first unimplemented stage. PRs 1–8 fill in the stages in order, and PR 9 restores the tools and snapshots.
Interfaces per stage (doc section → code)
MemoGroupId,MemoGroup { logical_node, child_groups, parents, queries, candidates }crates/types/src/stages/memo.rs:16Memo { groups, query_roots },find_or_add_group,add_candidate,candidatecrates/types/src/stages/candidates.rs:25CandidateForMemoGroupId,CandidateForMemoGroup,CandidateExpression,LogicalProperties,WindowLayout,parameter_list,LogicalRequirements,producer_satisfies_logical_requirementscrates/types/src/stages/candidates.rsErrorPropagation,LogicalRequirements::error_propagationcrates/types/src/stages/candidates.rsfn(&mut Memo) -> Result<(), Pass2RuleError>(rules 1–7),LogicalEdge,LogicalASAPMemoCandidatescrates/logical-asap-optimization/src/pass2/,crates/types/src/stages/logical_memo_candidates.rsExecutionTiming(existing, re-exported),StorageMedium,Lifetime,PhysicalPropertiescrates/types/src/physical/properties.rsPhysicalCandidateId,PhysicalEdgeId,PhysicalCandidate(+delivers_on),producer_satisfies_physical_requirements,PhysicalEdge,PhysicalASAPMemoCandidates(+edges,admissible_edges_into,admissible_edges_out_of),PhysicalCandidateKeycrates/types/src/stages/physical/memo_candidates.rsSelectionVariables { x, y, z, t }, constraints (A)–(F),SelectedEdge { producer, consumer, input_index_of_consumer },DagOfSelectedCandidatescrates/plan-selection/src/milp/model.rs,crates/types/src/stages/physical/graph.rsExecutionContextId,ExecutionContext,RefreshWindowIdcrates/types/src/stages/physical/execution_context.rscrates/plan-selection/src/milp/model.rscrates/plan-selection/src/milp/model.rsDeleted, and what replaces each
Materialization(types/src/physical/materialization.rs)PhysicalProperties { timing, lifetime }OperatorNode::{timing, materialization},with_timing,with_materializationPhysicalCandidate::properties(doc section 3, realizer)PhysicalPropertiesAssignment/MaterializationAssignmentside map, the timing passtiming.rs(apply_*,data_state,timing_under_consumer,validate_at_ingestion,planned_data_state,NodeToTimedNodeCache)PhysicalCandidate(PR 6)PhysicalWorkloadPlan::physical_properties,TumblingWindowChainExpansion::physical_properties,PlanOutput::physical_propertiesDagOfLogicalMemoGroups(+group_for_node,roots_over_groups)MemoMemo::candidates(Vec<Vec<_>>)MemoGroup::candidatesCandidateForMemoGroup::{root_node, input_groups, accuracy_budget_parts}expression: CandidateExpression(children = input groups),logical_properties,input_requirementsOriginOfCandidateForMemoGroup::{SharedBuild, SummaryResult}memo_population.rs(try_populate_pass1,NodeToStructuralIdCache),size_for_failure_probability, budget-share sizing (accuracy_budget_parts_per_measure,compose_*_with_accuracy_budget_parts,Sizing::shares),PerComputationCandidates::walkedfind_or_add_group/add_candidatewithparameter_list(PR 3)pass2/asap_aware_cse.rs(node-level window, rollup, top-k and scan-widening rewrites) andpass2/finer_aggregate.rsfind_or_add_group, with rules 1–7 over groups (PR 4)summary_results.rsshared_configuration_readers.rs,shared_producer.rs,shared_configurations.rsstate_groups.rs(add_shared_summary_state_groups, per-size groups,check_unexpanded_memo) andreuse.rspass2/memo/enumeration.rs(ChosenCandidatePerMemoGroup,enumerate,build_logical_asap_dags_from_chosen_candidates),asap_planner::selected_chosen_candidatesOperatorNodeOfCandidateForMemoGroup(Id),PhysicalCandidate::{operator_node, timing, materialization, producer_candidates_per_input, may_produce_query_output},PhysicalASAPMemoCandidates::{operator_nodes_of_candidates_for_memo_groups, implementation_roots, query_output_candidates, output_reference_count, physical_node, memo_group_of}PhysicalCandidate { logical_candidate_id, physical_properties },edges(),admissible_edges_*ProducerCandidates,ProducerSetInterner,producer_storage_metricsPhysicalEdgelist (PR 5)ReaderConstraint(all four variants) andreader_constraintsdelivers_on; the cost model (doc section 5, "No consumer-count policies")may_keep_across_evaluations_per_sole_reader_queryLifetimeinPhysicalProperties, chosen by Stage 3configurations.rsincl.compatible_timing,factoring.rs,inventory.rs,pruning.rs,reconstruction.rs),split_by_timing.rs, materialization and ingestion-eligibility rules inlib.rsgenerate_physical_asap_memo_candidatesandproducer_satisfies_physical_requirements(PR 1, PR 5); realizer (PR 6)optimize_physical_asap(_chosen), featuresreference-pricer/test-supportof the Stage 2 cratereference_pricer,selector.rs,WholePlanSelection, featurereference-pricergroups.rs(ResultSlot,slot_of,result_slots,run_kind, execution contexts, dominance pruning),groups/accuracy_positions.rsExecutionContextandmilp/model.rs(#1144:p[ctx,c],ebinaries, schedule groupsz[m,G],N[q],A[q, parts], constraint 8, constraint 9)SelectionVariablesand (A)–(F) (PR 6), contexts (PR 7), (K) (PR 8)milp/cost_terms.rs,warm_start.rs,completion.rs,decode.rsmilp/lp_diagnosis.rs, featurelp-diagnosischecks.rs(post-selection accuracy and latency checks),accuracy_binding.rsSelectionModelsmemo_pricing(reference_select,reference_enumeration,DEFAULT_REFERENCE_CHOICES,PlanningStagesRun::reference, themax_combinations/reference_choicesparameters), fuzzSearchKind::ExhaustiveandEXHAUSTIVE_MAX_COMBINATIONSAnalyticalCostError::PhysicalPropertiesError,PhysicalASAPDAGNode::physical_properties(both from the #1214 port)PerComputationLogicalMemoCandidates, Pass 1'sPrunedWayToCompute/pruned_ways_to_compute/pruned_of_target, andPruneReason's Pass 1 variants (RequiresExact,NullableAvgInput,NoRelationalCountSketchRealization,UnsupportedByDeployment,QuantileOutsideUnitInterval,TopKHeapOverOneRowPerItem,NoErrorBoundForQueryTarget)Memo; showing what Pass 1 leaves out moves to #1205SketchKindinsideFieldDataType::Sketch;accuracy::sizing::sized(budget-share sizing);propagation::with_resized_summaries,sizing::{with_summaries_sized_for_failure_probability, with_summaries_sized_for_targets, per_input_failure_probability, sized_for_failure_probability}LogicalProperties::parametersfromparameter_list(PR 1/3)compile_physical_asap_dag,compile_physical_asap_workload(_with_node_ids),PhysicalASAPDAGCompilation,PhysicalASAPNodeIdentityMap,PhysicalASAPDAG::{with_every_node_at_query_time, query_roots},ReferencePlanError,PlanOutput::physical_asap_dag,ExecutionDataStateError,InstallablePlanError::TimingAssignmentRealizer::realize(PR 6)asap_planner::test_support::query_time_referenceand the planner'stest-supportfeatureDeleted tests
643
#[test]functions are deleted and 2 are added (PhysicalProperties::new). The per-file table, with what each file covered and which PR restores it, is in this comment. By group:planner_layering_example{1,2,3,4}) over the reference pricerKept by building the DAG directly (decided 2026-11-06). Tests that hand-built operator roots and ran them now export them with the test-only
physical_asap_dag_at_query_time(_with_node_ids)instead of the deleted roots-based export. Restored: executortime_series_window,node_ids,current_series_heap,planspace_series_identity_heap, 3 ofdeployment_computation's tests; integrationfiltered_aggregates,kll_tumbling_window_execution,per_series_exact_execution,sql_cardinality,sql_frequency,exact_composition, and parts ofsketch_rollup,stage1_logical_asap_optimization,operator_design_examples,operator_sharing,promql_numeric_regressions,sql_to_post_asap,promql_to_post_asap; typesphysical_export; frontendcount_planning,pearson_corr.types/tests/physical_export.rs::untimed_plan_is_rejected(the +1 above, deleted after the comment was posted) is deleted: the builder always assigns query time, and an untimed export is no longer possible. Restored sketch tests fail at the executor'stodo!()until PR 6, because the builder leavesparameters: None. Tests whose DAG came from the planner (runtime_install's planning tests,sql_per_group_topk,sql_table_scans,per_sample_updater, the planner-builtdeployment_computationtests, and others) stay deleted; PR 6 restores them.Test status
cargo test -p <crate> --all-features --no-fail-fastat f57ae08, the same tree as the head exceptuntimed_plan_is_rejected, which failed there and is deleted since; the asap-types row leaves it out. Except for the stale fixture below, every failure panics at atodo!().PhysicalProperties::new(the 2 new tests)capability.rs)capability.rs: 35 θ, 13 Hydra grid) and the weighted-frequency kernel (7); includes restored tests whose builder leavesparameters: Noneasap_plannerbinary through the subprocess testsmaterialized_views_equal_the_stored_outputs_main_listedreads a checked-in plan file in the old wire format (Sketchwith θ). PR 9 re-baselines it with the snapshots.Verification
cargo check --workspace --all-targets: clean, no warnings.cargo clippy --workspace --all-targets: clean. The only allowances are the commented#[allow(dead_code)]markers listed under "New abstractions".cargo fmt --check: clean.untimed_plan_is_rejected:cargo test -p asap-types --all-features --test types physical_export(11 passed).