Files
greptimedb/tests/compatibility/wire/mito_columnar_samples
Yingwen 735401adc0 feat(mito2): consolidate columnar samples into bounded daily generations (#10129)
* perf(mito2): consolidate columnar samples into daily windows

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix(mito2): isolate daily source coverage and version the local cache

Signed-off-by: evenyag <realevenyag@gmail.com>

* test(mito2): use the exported index purge channel

Signed-off-by: evenyag <realevenyag@gmail.com>

* test(mito2): exercise daily source groups across the merge limit

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix(mito2): build stable daily groups from populated source windows

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix(mito2): anchor daily coverage once per source group

Signed-off-by: evenyag <realevenyag@gmail.com>

* test(mito2): validate partial-day reads and grouped rebuild cleanup

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix(mito2): skip daily sample readers outside query bounds

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-11-06 16:00:22 +08:00
..

Mito columnar samples version 1

This fixture freezes the version-1 sample wire contract in mito-samples.md. It is exercised by the owning Mito Rust test, not SQLness discovery:

cargo nextest run -p mito2 frozen_v1_samples_fixture_and_unknown_codec

v1-manifest.json and v1-part.hex describe a 397-byte part with raw compression, one leaf/root, and two samples for (table_id=7, tsid=42) at timestamp 100 ms. The first row is a put with sequence 9 and Float64 negative zero. The second is a delete with sequence 8 and a null field. Both rows must survive decoding.

The part was assembled independently of the Rust writer, using explicit little-endian fields and XXH64 with seed zero. Its layout is:

Range Content
0..16 Header
16..32 Constant-step timestamps: first 100, step 0
32..41 Delta sequences: first 9, ZigZag delta -1
41..43 Raw operations: put 1, delete 0
43..53 Nullable XOR: bitmap mode, validity 0x01, negative-zero bits
53..285 Leaf/root: one block, four column references
285..397 Trailer with root reference and checksum

The test installs these exact bytes and recorded object sizes, opens them through SamplesFormat, and verifies the values and order. It also changes a column codec to an unknown ID while updating checksums to test that unrequested columns can be skipped and requested unknown codecs fail explicitly. Legacy catalog identifier coverage remains in series_index::catalog tests.

Do not regenerate this fixture just to make a reader change pass. Preserve its bytes for future reader compatibility; introduce a separate versioned fixture when the approved format changes. This is a frozen-byte compatibility check, not a cross-binary upgrade/downgrade test. Older binaries are not promised to understand the new opt-in columnar-samples catalog identifier.

legacy-catalog-entry.json and daily-catalog-entry.json freeze the optional source-coverage extension, exercised by frozen_sample_catalog_coverage. Empty object lists isolate catalog decoding; the existing part fixture tests actual payload reads. Legacy entries cover one SST. Daily entries cover the entire listed source set and become ineligible if any source disappears.

sparse-daily-catalog-entry.json freezes explicit populated-day coverage per source. Older daily catalogs decode with empty coverage and are rebuilt before reuse. The source Parquet files and sample payload encoding are unchanged.