Conversation
Merging this PR will regress 1 benchmark
|
4051b84 to
97cbf22
Compare
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
97cbf22 to
d3526b5
Compare
Merging this PR will regress 1 benchmark
|
4051b84 to
97cbf22
Compare
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
97cbf22 to
d3526b5
Compare
Summary
The compressor tells schemes which serialized IDs the writer may emit. That is the whole change.
DecimalBytePartsis getting a second wire format. The decimal scheme should split wide values into lower parts only when the writer may emitvortex.decimal_byte_parts.v2, and otherwise keep writing single-part arrays under the frozen format. Today a scheme has no way to know what the writer permits. This PR gives it one, and nothing more.Design
AllowedSerializedIdsisAllorOnly(HashSet<ArrayId>). The file writer derives it from its enabled editions.BtrBlocksCompressorBuilder::retain_allowed_encodingskeeps its name, argument, and filter. It still drops schemes whoseproduced_encodingsare not all permitted. It additionally stores the set, intersecting repeated calls, and hands it to the compressor atbuild.CascadingCompressor::with_allowed_serialized_idsonly carries the set. It seeds every rootCompressorContextwith it, and derived contexts inherit it. Filtering stays the builder's job.CompressorContext::allows_serialized_idanswers for one ID.One rule for scheme authors, now in the
produced_encodingsdoc: declare the format you always write, and ask the context before writing any other. Check in both the estimate andcompress, so one writer configuration always produces one output. If a scheme forgets, the writer's array context rejects the ID at serialization and the write fails loudly.What this is not
No version selection in the compressor. No predecessor chains (#9770), no
replacesrelation (#9919), no wrapper for versioned schemes. Each of those chose a scheme version at configuration time and needed a relation between versions to do it. The known cases, wide decimals and per-chunk bitpacking, are one scheme with one branch, so the relation is unnecessary. If a scheme version with a genuinely separate implementation ever appears, a fallback list can be added on top of this without changing it.Behavior
No scheme on develop reads the context yet, so every existing compressor selects the same schemes and produces the same output. Golden snapshots are unchanged. RLE and OnPair, which build
Deltaarrays directly when the delta scheme is present, stay correct because a scheme in the compressor still has all its declared IDs permitted.Follow-ups
ifinDecimalScheme: declarevortex.decimal_byte_parts, and split wide values when the context permits the v2 ID. The CUDA preset denies the v2 ID so the GPU never sees lower parts.Tests
Deltawhen only the frozen format is permitted and takes its other branch when the newer format is. The declared format is required.Allwhen unrestricted, and intersects repeated calls.