BREAKING CHANGE: v0.0.8 -> sort/merge --rename impl + merge preserves unique metadata lines#7
Merged
Merged
Conversation
… unique metadata lines
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.
[0.0.8] - 2025-06-13
Added
--rename/-rflag formerge—chaintools merge --renamereassigns chainIDs sequentially in sorted output order, so the first emitted chain receives
id 1, the next2, and so on. The flag implies sorting: it defaults to--sort-by scorewhen no key is given, and respects an explicit--sort-by <KEY>when one is provided. Renaming is applied at final emission for both the in-memory
and external (spill-to-disk) merge paths, with no extra pass over the data. Backed
by new
write_chain_dense_with_id/write_chain_header_with_idwriter helpers.--rename/-rflag forsort—chaintools sort --renamereassigns chainIDs sequentially in sorted output order, following the selected
--sort-bykey(default
score). When combined with--out-index, the recorded offsets arecomputed against the renamed output so they remain consistent with the written
bytes.
Changed
mergededuplicates metadata — when merging with--sort-by/--rename,identical metadata (
#) lines that appear in more than one input (for example,files produced by a previous
split) are now emitted once, in first-seen order.Deduplication is performed at the byte level and does not affect
sort, whichcontinues to preserve a single input's metadata verbatim.