VariantDictionaryBuilder
class VariantDictionaryBuilder
Builds a dictionary by interning field names, and encodes it once the values that use it are written.
Append-only by construction: an id, once handed out, is embedded in value bytes that may already have been flushed, so ids can never be renumbered. A dictionary is therefore in insertion order, and VariantMetadata.sortedAndUnique is set only when insertion order happened to be lexicographic anyway — which is the common case for a single document whose fields are interned in sorted order, and never the case for a segment-wide dictionary.
Not thread-safe. The engine has a single writer by design.