Skip to main content

Module trie_merger

Module trie_merger 

Source
Expand description

Batch-at-a-time merging of sorted, consolidated UpdatesTyped chains.

The core is merge_batches, which walks pairs of chunks via merge_batch, building a chain of merged outputs with ChainBuilder. survey maps the interleaving of the two inputs at each trie layer, write_from_surveys (via write_layer and write_diffs) copies the ranges that the surveys identify into the output trie.

Structs§

ChainBuilder
Accumulates UpdatesTyped chunks one at a time, melding small adjacent chunks. Holds at most one chunk in memory (the meld target); whenever a push doesn’t meld, the prior target becomes “stable” and is emitted via the caller-provided sink. The sink can spill, count, or forward the chunk however it likes.
ReportContainer
Derived columnar container for an enum.

Enums§

Report
A report we would expect to see in a sequence about two layers.
ReportReference
Reference for an enum.

Functions§

extract
Partition merged into chunks ready to ship (times strictly less than upper) and chunks kept for future seals (times at-or-after upper), updating frontier to the antichain of kept times. merged is consumed lazily, and outputs flow through ship / kept sinks so the caller can spill or forward as chunks are produced rather than buffering them.
merge_batches
A merge implementation that operates batch-at-a-time.
survey
From two sequences of interleaved lists, map out the interleaving of their values.
write_diffs
Write the diff layer from a time survey and two diff inputs.
write_layer
Write one layer of merged output from a list survey and item survey.