Repository navigation
refactor(plan-selection): move files into the search/ and cost/ layout (move only) - #920
Merged
Merged
Conversation
Move only: search/legacy (the current search), search/memo (groups, rules, brute force), search/milp (model, coefficients), cost/per_node and cost/measured; module and use paths updated, items crossing the new module boundaries made pub(crate). The crate root's public paths are unchanged (pass, pane_sharing and the re-exports).
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 of #879
Why
asap-plan-selectiongrew three searches (the current whole-workload search, the memo brute force and the memo MILP) and the memo's per-node pricing under onepass/subexpr/directory, next to cost files at the crate root. This is step 1 of the approved layout: asearch/tree by search algorithm and acost/tree for everything that prices. Moving the files first, with no logic change, keeps the later splits (oflib.rsandmilp.rs) reviewable as small diffs.What
Files move into
search/legacy,search/memo(withrules/),search/milpandcost/. Module andusepaths are updated. Nothing else changes: no logic, no item renames, and the crate root's public paths stay the same.How
git mvper the table below, plus three small newmod.rsfiles (search/legacy,search/memo/rules,search/milp).super::paths in the moved files are rewritten ascrate::paths.pub(crate). That is everypub(super)in the moved files, plus a few private helpers that sibling modules used throughsuper::(inbrute_force,per_node,measured).#![allow(dead_code)]is added tocost/per_node.rsandsearch/milp/mod.rs. They used to inherit it from the memo module.lib.rsdeclarespub mod search;withpub use search as pass;andpub use search::legacy::pane_sharing;, soasap_plan_selection::pass::*andasap_plan_selection::pane_sharingresolve as before and no other crate changes.pass/mod.rssearch/mod.rspass/stage1_to_stage3.rssearch/legacy/stage1_to_stage3.rspass/components.rssearch/legacy/components.rspass/interchangeable.rssearch/legacy/interchangeable.rspass/query_candidates.rssearch/legacy/query_candidates.rspane_sharing.rssearch/legacy/pane_sharing.rspass/subexpr/mod.rssearch/memo/mod.rspass/subexpr/groups.rssearch/memo/groups.rspass/subexpr/capability.rssearch/memo/rules/capability.rspass/subexpr/windows.rssearch/memo/rules/windows.rspass/subexpr/scans.rssearch/memo/rules/scans.rspass/subexpr/search.rssearch/memo/brute_force.rspass/subexpr/milp.rssearch/milp/model.rspass/subexpr/coefficients.rssearch/milp/coefficients.rspass/subexpr/pricing.rscost/per_node.rsmeasured_operation_costs.rscost/measured.rscost/analytical_cost.rscost/analytical.rscost/physical_operator_statistics.rscost/operator_statistics.rsAll paths are under
crates/plan-selection/src/.Key code interfaces added / modified
None (paths only). Public paths kept:
asap_plan_selection::pass::*(now an alias ofsearch),asap_plan_selection::pane_sharing, and every crate-root re-export. The publiccostsubmodules are renamed with their files (cost::analytical,cost::operator_statistics); no other crate uses them.Major algorithm changes
None.
Before this PR
The memo search, its MILP and its per-node pricing lived together in
pass/subexpr/; cost files were split between the crate root andcost/.After this PR
Each search lives in its own directory under
search/, and everything that prices lives undercost/. Splittinglib.rsandmilp.rscomes in a later PR.Verification
cargo test -p asap-plan-selection: all tests pass.cargo check --workspace --tests: dependent crates build unchanged.cargo fmt --checkandcargo clippy -p asap-plan-selection --all-targets -- -D warnings: clean.git diff -M --stat: every file is detected as a rename. The remaining line changes areuseand module paths.cargo doc -p asap-plan-selection --document-private-items: the same unresolved links as before the move, none new.