Skip to content

support merging multiple MassMap shards into one file#8

Merged
SF-Zhou merged 2 commits intomainfrom
dev
Oct 31, 2025
Merged

support merging multiple MassMap shards into one file#8
SF-Zhou merged 2 commits intomainfrom
dev

Conversation

@SF-Zhou
Copy link
Owner

@SF-Zhou SF-Zhou commented Oct 31, 2025

No description provided.

@SF-Zhou SF-Zhou changed the title support merge multiple MassMap shards into one file support merging multiple MassMap shards into one file Oct 31, 2025
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bedd376) to head (7061820).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              main        #8    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            6         6            
  Lines          676       898   +222     
==========================================
+ Hits           676       898   +222     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a new MassMapMerger feature to efficiently merge multiple massmap files without full deserialization. The merger enables combining disjoint bucket ranges from multiple massmaps into a single consolidated file.

Key changes:

  • Introduced MassMapMerger to merge multiple massmap files
  • Replaced empty_buckets with occupied_bucket_count and added occupied_bucket_range to track non-empty bucket distribution
  • Made bucket_metas and reader fields accessible within the crate to support merging

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/meta.rs Updated MassMapMeta to track occupied buckets with count and range instead of empty bucket count
src/massmap.rs Changed visibility of bucket_metas and reader from private to pub(crate) to enable merge operations
src/lib.rs Exported MassMapMerger as a public API
src/builder.rs Added MassMapMerger implementation with merge logic, updated builder to track occupied bucket ranges, and added comprehensive test coverage
examples/massmap.rs Added CLI merge command with argument handling
README.md Updated documentation examples to reflect the new occupied_bucket_count field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SF-Zhou SF-Zhou merged commit 9600cc9 into main Oct 31, 2025
5 checks passed
@SF-Zhou SF-Zhou deleted the dev branch October 31, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments