Skip to content

refactor(types): name the memo's view-coverage file for what it holds, drop two coverage forwarders, fix stale coverage docs (#1207) - #1272

Merged
zzylol merged 1 commit into
mainfrom
refactor/1207-pr2-cleanup
Nov 10, 2026
Merged

zzylol merged 1 commit into
mainfrom
refactor/1207-pr2-cleanup

Conversation

@zzylol

@zzylol zzylol commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Cleanup after #1207 PR 2 (#1230). The memo file that holds only view_coverage was named aggregate_coverage.rs, two IR functions only forwarded to another, and the design doc still described OperatorNode::coverage() with a CoverageCache, which no longer exist. This PR renames the file, deletes the forwarders, and fixes the stale text. No behavior change: the same 235 tests pass before and after.

Review guide

Behavior: before → after

None. Plans and outputs are unchanged.

Interfaces

Public paths are unchanged (asap_types::stages::view_coverage, Operator::aggregate_coverage). Internal changes only:

 // crates/types/src/stages/logical/
-aggregate_coverage.rs   // holds view_coverage, its expansion, and the hash helper
+view_coverage.rs        // same content, named for what it holds
-use group::MemoGroupAsInput;            // private re-export in logical/mod.rs
 // column_properties.rs, memo/mod.rs, memo/tests.rs import it from the group module

 // crates/types/src/ir/properties/aggregate_coverage.rs
 impl<I: OperatorInput> Operator<I> {
     pub fn aggregate_coverage(&self) -> Result<AggregateCoverage<I::Reference>, CoverageError>; // now holds the rule's body and doc
 }
-fn coverage_of<I: OperatorInput>(operator: &Operator<I>) -> Result<AggregateCoverage<I::Reference>, CoverageError>;
-fn reference_of<I: OperatorInput>(input: &InputOrTemporaryBuild<I>) -> Option<I::Reference>;

Both removed functions only forwarded (coverage_of was called only by the method; reference_of only called input.reference(), now OperatorInput::reference at its two call sites).

Algorithm changes

None.

Decisions and open questions

None.

Verification

Scope Passed / failed / ignored Newly failing vs base Notes
cargo test --all-features -p asap-types -p asap-stage0-memo -p asap-stage1-pass1-per-computation-candidates -p asap-stage1-pass2-reuse-candidates 235 / 0 / 0 none same test names and results as on origin/main 69fc34a
cargo check --workspace --all-features --tests clean none
cargo clippy --workspace --all-features --all-targets -- -D warnings clean none
cargo fmt --all --check clean none

No new tests: moves, renames, and docs only.

Follow-ups

None. The user guide's "Check summary coverage" and planner_fuzz's campaign_writes_summary_coverage_and_drafts mean something else and are left as they are.

Human review — do not complete with an agent

  • The MVP boundary is correct.
  • New conceptual layers or public interfaces are necessary.
  • The before/after description matches the intended product behavior.
  • Human reviewer:
  • Decision and rationale:

…, drop two coverage forwarders, fix stale coverage docs (#1207)

- Rename stages/logical/aggregate_coverage.rs to view_coverage.rs; the
  public path stages::view_coverage is unchanged.
- Merge coverage_of into Operator::aggregate_coverage and call
  OperatorInput::reference directly instead of the reference_of forwarder.
- Import MemoGroupAsInput from the group module everywhere; drop the
  private re-export in stages/logical/mod.rs.
- Docs: "summary coverage" -> "aggregate coverage" in input.rs;
  asap-primitive-schema.md no longer describes OperatorNode::coverage()
  or a CoverageCache, names view_coverage.rs, and says
  SummaryTypeCannotRegroup.

No behavior change.
@zzylol zzylol added documentation Improvements or additions to documentation ir Pre-ASAP or post-ASAP intermediate representation refactor labels Nov 10, 2026
@zzylol
zzylol merged commit fc20367 into main Nov 10, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ir Pre-ASAP or post-ASAP intermediate representation refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant