Repository navigation
refactor(planner): move Pass 1 helpers out of the legacy search; drop show_post_asap_ir, erp and empirical_comparison - #676
Merged
Conversation
zzylol
commented
Oct 13, 2026
zzylol
commented
Oct 13, 2026
This was referenced Oct 13, 2026
… show_post_asap_ir, erp and empirical_comparison - New asap_aware_mapping::realization holds the summary realization helpers (summary_candidates, accuracy_target, accuracy_budget, default_size_params, DEFAULT_DELTA, column_ref, summarised_column, summarised_input), moved unchanged from replacement.rs; Pass 1 and the legacy search import them. - Delete the show_post_asap_ir bin (replaced by stage_pipeline); rename show_pre_asap_ir to show_logical_dag. - Rename the frontend-common resolver's `fallback` schema to `usage_derived_schema`. - Delete erp.rs and empirical_comparison.rs, and snapshot_prepare_cpu (only empirical_comparison used it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
zzylol
force-pushed
the
stack/g2-legacy-removal
branch
from
October 13, 2026 19:29
a4f58c1 to
67e7847
Compare
realization.rs no longer imports from the legacy replacement search; replacement.rs re-exports the error from realization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
This was referenced Oct 13, 2026
Closed
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.
Why
This is the first step in removing the legacy replacement search. The rule is that a legacy piece is deleted only once the new architecture implements it, and the group that reimplements a capability deletes the legacy piece. This PR deletes only the pieces that are already replaced (
show_post_asap_ir→stage_pipeline) or that the user decided to drop (erp,empirical_comparison: Assumption 5's deployment-owned empirical models cover them, and sketch-bench keeps its own copy). It also moves the helpers Pass 1 shares with the legacy search out ofreplacement.rs, so that file can be deleted later without touching Pass 1.What stays, and which group or issue removes it:
recurrence,SharedSubDAGStrategy: G4accuracy::reconciliation: G5function_rules,accuracy::composition,exact_composition: Compose accuracy guarantees through arithmetic and comparisons over approximate values #669, with anaccuracy::allocationfollow-uppane_sharing: G6/G10grouping: G7cost_modelcapability hooks: G9empirical_cost,empirical_resources,physical_plan_cost_model: Calibrate plan selection's costs from measured sketch costs #679rollup,topk_reuse, nested-sum: Pass 2 reuse rules: rollup, top-k reuse, nested sum merge #680dag_export,asap_types::{dag_export, cost}: the early viewer rebuildreplacementsearch,rewrite,explanation,propagate,PlanningModels.cost, the legacy integration tests and evidence types): lastWhat
asap_aware_mapping::realizationholdssummary_candidates,accuracy_target,accuracy_budget,default_size_params,DEFAULT_DELTA,column_ref,summarised_columnandsummarised_input. The bodies moved unchanged fromreplacement.rs. The one difference is thatsummarised_columnis nowpub(crate), because the legacy search still calls it. Pass 1 (per_computation_candidates),replacement.rsand the other callers import from the new module.RealizationErroralso moves torealization(re-exported fromreplacement), so the new module does not depend on the legacy search.show_post_asap_irbin, whichstage_pipelinereplaces. Renamedshow_pre_asap_irtoshow_logical_dag. Bins are auto-discovered, and no CI or tests referenced either name.fallbackschema tousage_derived_schema.erp.rsandempirical_comparison.rs, plusempirical_cost::snapshot_prepare_cpu(onlyempirical_comparisonused it) and its unit test.Verification
git grep -wfinds no remaining reference to any deleted public item or to either old bin name outside Markdown.cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warnings: clean.cargo nextest run --workspace: 1609 passed, 50 skipped. All 23 removed tests were in deleted code: 10 inerp, 9 inempirical_comparison, 3 inshow_post_asap_ir, and 1 forsnapshot_prepare_cpu.stage_pipeline --example planner-layering-1output is byte-identical totools/dag-viewer/examples/planner-layering-example1.json.tools/dag-viewer/test_render.py: 29 OK.tools/verify_metricsql_external_consumer.sh: OK.Human review
RealizationErrorare unchangederp/empirical_comparison(andsnapshot_prepare_cpu) matches the decision🤖 Generated with Claude Code
https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW