Repository navigation
refactor: remove dead and test-only code, part 1 (#1046) - #1069
Merged
Conversation
Merged
3 tasks
milindsrivastava1997
force-pushed
the
1046-remove-dead-and-test-only-code-row-reference-oracle-old_docs-test-only-demand-model-batch-bridge-memo-snapshot
branch
from
October 30, 2026 00:20
2db827b to
46f12b7
Compare
zzylol
previously approved these changes
Oct 30, 2026
milindsrivastava1997
force-pushed
the
1046-remove-dead-and-test-only-code-row-reference-oracle-old_docs-test-only-demand-model-batch-bridge-memo-snapshot
branch
from
October 30, 2026 00:55
46f12b7 to
31f33c6
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- executor: remove the batch_execution bridge; the temporal-window test that used it builds its two-node DAG. - logical: remove the shared-producer memo snapshot. - physical: remove the query-time raw-scan filters; test-gate physical_candidate_count. - plan-selection: remove the test-only demand model and run_stage1_to_stage3_from_pass1; run_with_initial_memo takes the initial memo directly. - types: remove hydra_kind_for, default_hydra_params, MeasuredCpu, MeasuredResources and Measurement, and the offline sketch evidence doc and schemas that described them. - planner-layering.md: drop the removed function (the whitespace changes are the trailing-whitespace hook). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milindsrivastava1997
force-pushed
the
1046-remove-dead-and-test-only-code-row-reference-oracle-old_docs-test-only-demand-model-batch-bridge-memo-snapshot
branch
from
October 30, 2026 01:32
31f33c6 to
bafe160
Compare
milindsrivastava1997
deleted the
1046-remove-dead-and-test-only-code-row-reference-oracle-old_docs-test-only-demand-model-batch-bridge-memo-snapshot
branch
October 30, 2026 01:39
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part 1 of #1046. It covers the plain deletions. The row-reference oracle,
temporal::reduceand the devtools corpus helpers are in a follow-up PR.Why
Production never reaches this code, and keeping it costs time. For example, the memo snapshot had to be re-recorded after unrelated memo changes. Removing it cuts about 4,150 lines.
What
Removed:
old_docs/. Nothing references it, anddocs/replaces it.plan-selection/src/search/costing/demand.rs(#[cfg(test)]). Its tests never compared it against the production cost evaluator.executor/src/runtime/batch_execution.rs. Production code never calls it. The one test that used it (aggregate/temporal.rs) now builds its two-node DAG directly.logical-asap-optimization/src/pass2/memo/shared_producer_snapshot.rs(#[cfg(test)]). The rule tests inpass2/memo/rules/cover the same behaviour.physical-asap-optimization:optimize_physical_asap_without_query_time_raw_scans,every_assignment_scans_raw_at_query_timeandreads_raw_at_query_time, which have no callers.physical_candidate_countis now private and#[cfg(test)].run_stage1_to_stage3_from_pass1, which has no callers. With it gone, the privaterun_with_initial_memoalways received an initial memo, so it now takesDagOfLogicalMemoGroupsinstead ofOption<_>.hydra_kind_foranddefault_hydra_params, plus their tests. Two doc comments that linked tohydra_kind_fornow state the rule in prose.MeasuredCpu,MeasuredResources, andMeasurement, which onlyMeasuredCpuused. Also the test that comparedModeledCpuagainstMeasuredCpu.docs/develop_docs/offline-sketch-evidence.md,offline-sketch-evidence.schema.jsonandoffline-comparison-evidence.schema.json. These docs described the offline benchmark evidence wire format in terms ofMeasuredCpu,MeasurementandMeasuredResources. They also namedResourceMeasurementsandcrates/asap-aware-mapping, neither of which exists anymore. Nothing in this repo produces or reads that format. This deletion is not in Remove dead and test-only code: row-reference oracle, old_docs, test-only demand model, batch bridge, memo snapshot #1046's list.docs/design_docs/proposals/planner-layering.mdno longer names the removed function. The trailing-whitespace pre-commit hook also stripped existing trailing whitespace from 27 lines of that file, so the PR includes those lines too.How
Deletions only. The one non-deletion code change is the
temporal.rstest, which now runs a source → window DAG itself instead of going throughevaluate_batch. It still asserts on the same first output row.As agreed in the planning discussion, this PR leaves the files #1047 rewrites alone: the
pass2/memo/*helpers,accuracy::native_target,asap_aware_cse::*,workload_candidates,query_pruning,optimize_physical_asapandselect_plan. The one exception is removing themod shared_producer_snapshot;line inpass2/memo.rs.Key code interfaces added / modified
Removed public items only. Nothing is added.
Major algorithm changes
None.
Before this PR
The workspace carried about 4,150 lines that production never reaches. Every memo change had to re-record the FNV snapshot of the whole memo.
After this PR
The code is gone, and memo changes no longer need a snapshot re-record. Behaviour is unchanged.
Evidence
Not applicable. Behaviour is unchanged; see Verification.
Verification
cargo test --workspacepasses, after rebasing onto92fab4de(refactor: rename memo group, candidate and computation-target fields (#1047 P2) #1058).No new tests.
Snapshot changes
None.
Architectural decisions
tests/call can't be put behind#[cfg(test)]. Deciding how to handle them is split out to Decide how to hide test-only public items used across crates #1057.Measurementand the evidence docs were removed together withMeasuredCpu, instead of keeping them for a format nothing in the repo uses.Limitations and follow-up
temporal::reduce, and deduplicate the devtools corpus helpers.Human review — do not complete with an agent
🤖 Generated with Claude Code