Skip to content

Columnar merge batcher#693

Merged
frankmcsherry merged 1 commit intoTimelyDataflow:master-nextfrom
frankmcsherry:columnar-merge-batcher
Mar 22, 2026
Merged

Columnar merge batcher#693
frankmcsherry merged 1 commit intoTimelyDataflow:master-nextfrom
frankmcsherry:columnar-merge-batcher

Conversation

@frankmcsherry
Copy link
Member

@frankmcsherry frankmcsherry commented Mar 22, 2026

Work with Claude to bring changes from a DD columnar implementation into the columnar.rs example. In particular, this walks back that example's use of the chainless merge batcher, which is sufficiently risky to want to avoid. The recent change to internal iteration in DD has made this easier. Other functionality was brought over, and .. it's worth seeing what might be redundant with what is already here (which was working, to some extent). The goal is to get the example to look like what it would be for a repo-external human to assemble the necessary parts for a new container type.

The main additions are a pass-through chunker (the trie-shaped containers are ready to go), a SizeableContainer implementation so that the merge batcher can snip batches at the right boundaries. Also pivots of the trait methods of the chainless batchers BatcherStorage to InternalMerge; they are similar, except that merging yields when low on fuel, and the extraction draws out the frontier as well.

The columnar example vs the spines new example suggests that there is some potential here, but be warned that some amount of this is because the harness produces sorted data by accident, and that's helpful for the ordered columnar container.

     Running `target/release/examples/columnar 1000000 1000`
2.217771792s    loading complete
5.411358s       queries complete
5.411610125s    shut down

     Running `target/release/examples/spines 1000000 1000 new`
Running ["new"] arrangement
2.510052208s    loading complete
6.202638292s    queries complete
6.202815875s    shut down

Replace the chainless_batcher::BatcherStorage implementations for
ValStorage and KeyStorage with InternalMerge implementations that
work with DD's standard MergeBatcher pipeline. This demonstrates
that custom trie-shaped columnar containers can use DD's existing
merge infrastructure without modifications to DD itself.

Changes:
- Implement InternalMerge for ValStorage and KeyStorage
- Implement SizableContainer for both storage types
- Add TrieChunker: a pass-through chunker for pre-sorted trie data
- Update batcher type aliases to use MergeBatcher + InternalMerger
- Remove chainless_batcher dependency from the example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frankmcsherry frankmcsherry changed the base branch from master to master-next March 22, 2026 21:34
@frankmcsherry frankmcsherry merged commit 38bc273 into TimelyDataflow:master-next Mar 22, 2026
6 checks passed
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