Repository navigation
Add experimental Wallaby floating-point compression codec - #113575
alexey-milovidov wants to merge 155 commits into
Conversation
Adaptive lossless codec for `Float32` and `Float64`: splits data into 1024-value blocks and per block picks the cheapest of constant collapse, integerization with frame-of-reference or zigzag-delta `FFOR` packing, XOR against a ring of 32 recent reference values, or raw storage. Motivated by the evaluation of `Chimp` (#66467) and the recent floating-point compression literature: ALP (SIGMOD 2024), Elf (VLDB 2023), Camel (SIGMOD 2025) and Kangaroo (SIGMOD 2026, https://doi.org/10.1145/3802076). The codec deliberately avoids the decimal-precision mantissa erasure technique of the Elf family and of Kangaroo, which is covered by patent US 12,289,120 B2; all building blocks used here are prior art: Gorilla XOR, Chimp128-style windowed references with an explicit index, ALP-style integerization, and delta/zigzag/run-length encoding. Co-Authored-By: Claude Fable 5 <[email protected]>
Three changes to the XOR encoding after benchmarking against `ALP`, `Gorilla`, `FPC` and the `Chimp` proposal from #66467: - A per-vector flag omits the trailing-zero field when sampled XOR residues have almost no trailing zeros (typical for full-precision doubles), where the field was pure overhead. - The encoder replaces the full ring scan with two O(1) probes (the predecessor and a high-bits hash table) and bails out to the RAW mode early on incompressible data; compression of incompressible data got 10x faster and now matches `NONE`. - The reference ring grows from 32 to 64 values with a 6-bit index, which covers longer periodicity in the data. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Conflict resolution notes: - `SZ3` took method byte 0x9d and `Quantized`/`ZXC` took 0x9e/0x9f on master, so `Wallaby` moves to 0xa0 (nothing was written with the old byte outside local experiments). - `docs/en` was removed on master (legacy Docusaurus documentation); the `Wallaby` section stays only in `docs/reference/statements/create/table.mdx`. - `01222_system_codecs.reference` gets the `Wallaby` row with method byte 160 next to the new `Quantized`/`SZ3`/`ZXC` rows, 18 codecs in total. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [e2c5d03] Summary: ❌
AI ReviewSummary
Findings
Tests
Final VerdictStatus: Correct the remaining native-order comparison in |
Findings from benchmarking on real data (mgbench machine metrics, the environmental sensors dataset, NOAA weather): - Real gauge columns interleave many sources, so neighboring values are unrelated while equal and similar values recur hundreds of rows apart. The reference ring grows to 256 values (8-bit index) and the encoder gains two more O(1) probes: a whole-value hash that finds an equal ring value for the EQUAL branch (low-cardinality columns), and a low-bits hash that finds a reference producing an XOR result with many trailing zeros. The trailing-field elision decision now also estimates low-bits collisions, so it does not throw away the field where such references exist. - The threshold above which the XOR encoding is tried in addition to a successful decimal packing was calibrated for `Float64` and left `Float32` vectors on near-raw 31-bit packings; it now scales with the value width. This alone shrank the mgbench `load_one` column from 101 MB to 72 MB, ahead of all other floating-point codecs. - One high-precision sample must not force a huge decimal scale onto a whole vector: when quantization with the largest sampled scale degenerates, the median sampled scale is tried before giving up. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Speed comparison on the real datasets (same columns as the size table in the description; throughput in MB/s of uncompressed data, single thread, on a loaded shared server — treat small differences as noise. Compression (
Decompression (
Reading of the results:
The low |
- Initialize the scratch buffers flagged by `cppcoreguidelines-pro-type-member-init`; the three per-vector buffers on the compression path that are always filled before use keep a `NOLINT`, matching how `CompressionCodecALP.cpp` handles the same pattern, because zeroing them per vector is a measurable cost. - `decodeXor` now checks the remaining bit count before every read: `BitReader` silently produces zero bits past the end of the buffer, so a truncated XOR payload used to synthesize garbage values instead of throwing; now it deterministically throws `CANNOT_DECOMPRESS`. - `doDecompressData` now rejects payloads with leftover bytes after the last vector and the trailing remainder, instead of silently accepting appended junk. The last two address the review comments. Co-Authored-By: Claude Fable 5 <[email protected]>
Build profile diff (arm_release)Comparing Binary sizes
The official master build is compiled with Object file sizes
|
| Object file | Master | PR | Δ |
|---|---|---|---|
src/CMakeFiles/clickhouse_compression.dir/Compression/Wallaby.cpp.o |
new | 399.30 KiB | +399.30 KiB |
src/CMakeFiles/clickhouse_compression.dir/Compression/CompressionCodecWallaby.cpp.o |
new | 79.05 KiB | +79.05 KiB |
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.
Compile time of recompiled translation units
785 translation units recompiled, 5431 s compile time in total, 783 of them have a recent master baseline.
Symbol sizes
| Binary | Symbol | Master | PR | Δ |
|---|---|---|---|---|
programs/clickhouse |
DB::Wallaby::(anonymous namespace)::log2Table()::table |
new | 128.02 KiB | +128.02 KiB |
programs/clickhouse |
DB::Wallaby::(anonymous namespace)::xlog2xTable()::table |
new | 128.02 KiB | +128.02 KiB |
programs/clickhouse |
DB::Wallaby::(anonymous namespace)::layoutFolding()::folding |
new | 85.60 KiB | +85.60 KiB |
… document the method byte The `decodeXor` function now verifies that the declared payload was fully consumed: after decoding all values, fewer than 8 bits may remain and all of them must be zero (the encoder pads only with zero bits), so an inflated `payload_size` hiding junk bytes raises `CANNOT_DECOMPRESS`. Also add the `0xa0` method byte of `Wallaby` to the `NativeFormat` spec, matching the existing `SZ3`/`Quantized`/`ZXC` experimental-codec entries, and rename the `quantizeAll` lambda to `quantize_all` for naming consistency.
|
🕵 @rienath Here is the requested comparison with
Reading of the results:
Generator expressions (10M rows each, One coordination note found while building the combined binary: this PR and #110613 both claim method byte |
The early bailout in the `Wallaby` XOR encoder compared the bits written so far against a per-value budget, so an incompressible prefix could abandon the XOR encoding even when a run-collapsible suffix would still have made it far cheaper than the RAW mode, violating the "pick the cheapest encoding per vector" contract. The encoder now precomputes, for every position, how many of the remaining values differ from their predecessor. Each such value costs at least the cheapest single-value branch (the EQUAL branch: selector, tag and ring index, 11 bits), while repeated values can collapse into runs, so the encoding is abandoned only when even this lower bound cannot beat the RAW mode. On purely incompressible data the bailout now triggers near the end of the vector instead of after 256 values, which costs about 2x on that path (240 MB/s single-threaded, still above the XOR-family codecs); mixed blocks of incompressible values and runs now compress at 2.1 bytes per value instead of falling back to RAW.
|
🕵 CI failure attribution for the latest run:
|
rienath
left a comment
There was a problem hiding this comment.
🕵 Having looked at both tables together, I don't think Wallaby clears the bar. Ratio-focused users are better served by ZSTD(3)/PCO on all 8 real columns; speed-focused users get faster selects from ALP on every dataset measured (~25% on decimal, 2–5× on non-decimal). What's left is a size edge over ALP that is −22–29% on columns where both trail ZSTD(3) by 1.5–2.5× (so nobody size-conscious would use either), but only −2…6% where the fast family is actually competitive — the win is concentrated exactly where the codec is the wrong choice. Combined with the pathological encode case and a fifth permanent float format, I'd close this, and record the one durable finding — delta-over-integerized values buys ~25% on real monitoring data — in an issue for the future.
|
I think we should continue with PCO and not continue with Wallaby. From the data provided above, Wallaby doesn't have an edge worth pursuing. It's possible that next iteration of this family of algorithms will, we could consider them. Please reopen this PR and ping me if you have data that contradicts or disagree. |
# Conflicts: # src/Client/BuzzHouse/Generator/FuzzConfig.cpp
|
🕵 Status 2026-11-11: merged CI on the previous head |
# Conflicts: # tests/queries/0_stateless/01222_system_codecs.reference
|
🕵 Status 2026-11-18: merged There are no unresolved review threads. @rienath's |
Fixes the `modernize-use-nodiscard` clang-tidy failure in the `arm_tidy` build: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113575&sha=4e3131d9855ff0efae2d9cc2281d92eb0e279400&name_0=PR&name_1=Build%20%28arm_tidy%2C%203%2F4%29 #113575 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The autogenerated version was bumped to 26.12, and the setting has not been released in 26.11, so the `settings_changes_history` style check requires the record under the current version. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113575&sha=latest&name_0=PR&name_1=Style%20check #113575 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Status 2026-11-20: pushed
|
|
🕵 Status 2026-11-20: merged The only red on There are no unresolved review threads. The |
The previous `Wallaby` bit-packed its integers and fell back to XOR, so `PCO` produced smaller data on most columns. The codec is rewritten around an entropy coder so that it compresses better than both `ALP` and `PCO`: - Front-ends, chosen per chunk of up to 16384 values by measuring: bit patterns with the common trailing zeros removed; division by a denominator (decimals, and other rational grids such as averages of decimals over 60 samples, found by continued fractions and by trying small multiples of powers of ten); multiplication by a constant (values that were produced by one, which are not correctly rounded decimals). `Float32` values can be reconstructed in single precision. Values that are slightly off the grid get adjustments (a distance in the order of bit patterns); values with no integer (`NaN`, infinities) are exceptions, removed from the sequence and coded separately. - Prediction: differences of order up to 7 with an optional center, after removing a common divisor. - Entropy coding with tANS (4 interleaved states): the alphabet mixes dictionary symbols for frequent exact values with logarithmic or fixed-width bins, zero runs are symbols of their own, and the frequencies can depend on the magnitude of an earlier token. The model is described by a few parameters, so the header of a chunk stays small on blocks of a few thousand values. The implementation lives in `src/Compression/Wallaby.cpp`; `CompressionCodecWallaby.cpp` is the codec glue. The decoder validates all lengths and indices, does not depend on padding after the compressed data, and was run under ASan and UBSan over hundreds of thousands of truncated and corrupted blocks. The unit tests of the old byte format and the regression tests of the old scale chooser are replaced by tests of the new format; the format is described at the top of `Wallaby.cpp`. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The encoder compared candidates (front-end and differencing order) by a sampled analysis that guesses the gain of the dictionary; measured against the final size, that guess is off by 10-14% on dictionary-heavy streams, which picked the wrong candidate in 12% of the chunks of a longitude column and cost up to 1% of the size. `StreamEncoder::finalize` is now split in two stages: `count` (bins, dictionary, the alphabet and the counts of its tokens; its estimate is within about 1% of the final size) and `complete` (tokens, contexts, frequencies, the header of the model). Candidates are ranked by `count`; only the winner is completed, the runner-up only when the two are within 0.3%, and the stream of adjustments only when it is going to be written. Other changes to the encoder, none of which changes the format: - Frequencies are normalized with a table of logarithms and an array heap instead of `std::priority_queue` and `log2` per symbol; same result. - All the context trials are counted in one pass over the tokens; the token pass has no unpredictable branch on the kind of the token; the counts of the tokens are derived without making the tokens. - Exact values of a narrow range are counted in an array indexed by the value instead of a hash table; the hash table starts with the large size when the sample predicts an overflow of the small one. - The size of the ANS table is chosen with the size of the frequencies in the header taken into account. - The second conversion with a finer denominator is checked on the sample of inexact values first. - The bit patterns are not tried when the integers are much narrower than the mantissa and only a few values are exceptions; higher differencing orders are not tried when the first one is far behind. On the sampled corpus of 71 columns the sizes change by -0.08% in total (no column is worse by more than 0.2%), and the encoder is 15-35% faster on `Float32` columns with many repeated values. Also fix `WallabyTest.RoundTripOfSizesAndTails`, which fed an empty block to the generic part of the codec. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The analysis of a stream looks at stripes of 256 values and counted zero runs within them, so a long run looked like many short ones, and coding one token per zero was estimated to be smaller. A chunk of long plateaus (for example the elevation of weather stations, whose differences are almost all zero) was coded with 16384 tokens instead of a few. Now a run is counted where it begins, with its whole length, and very long runs are preferred when the two sizes are about the same: they make few tokens, which are much faster to code in both directions, and need a smaller ANS table. The counting of distinct values skips a value that repeats the previous one, which removes a chain of dependent updates of the same word on such data. On the sampled corpus of 71 columns no column gets larger by more than 0.02%; columns with long runs get up to 12% smaller, up to 2.9x faster to compress and up to 2.7x faster to decompress. The format does not change. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
Conflict in `src/Client/BuzzHouse/Generator/SessionSettings.cpp`: `Wallaby` stays in the pool of codecs for floating-point columns, and `SZ3` is added only for lossy tables as on master. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The encoder worked on 64-bit integers for both types, so a block of `Float32` (16384 values) went through twice the memory per value in every pass. `StreamEncoder` is now a template on the type of its values, and `Encoder<Float32>` keeps the latents, the adjustments, the residuals, the hash keys and the raw bits in 32 bits. The differences of bit patterns of floats of opposite signs do not fit into 32 bits, so the arithmetic on the latents of `Float32` is defined to be modulo 2^32. The decoder already truncated the bit patterns to the width of the float; it now also reads the latent of the DIV and MUL front-ends as a signed 32-bit number. The format is otherwise unchanged and its description is updated. The integers of the decimal front-end of `Float32` are limited to 2^31. On the sampled corpus all the round trips are bit-exact, three columns change their size by 0.01%, and the encoder is about 5-10% faster on `Float32` columns; the ASan and UBSan harness passes at four block sizes. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
Evaluating a candidate took three or four passes over the values: a sampled analysis, the bins of every value, a hash table for the dictionary, and the tokens. Now the exact values are counted first, in an array indexed by the value when the range is narrow, or in a hash table when a sample has repeated values, and the rest comes from the distinct values: - With few distinct values (a quarter of the chunk at most) the statistics for the choice of the bins are made from them: exact instead of sampled, and cheaper. - The counts of the bins and the token of every value come from the slots of the values, without computing the bin of every value again. - The zero runs of a counted stream are found once, from a bit mask of the zeros, and reused for the statistics, for the counts of the run tokens and for the token pass. Also: the classes of every pair of parameters of the logarithmic bins are folded from one table computed once per process; repeated values of the sample are found with a small hash set instead of a sort; frequencies are scaled without a division per symbol; an Exp-Golomb code is one write; the bits of four tokens are written at once; the ANS states stay in registers; the dictionary of 32-bit values is sorted as packed integers. These keep the output byte-identical. On the sampled corpus of 71 columns the sizes change by -0.02% in total (24 columns smaller, 5 larger by at most 0.16%), all the round trips are bit-exact, and the encoder is 15-30% faster on `Float32` columns than before the 32-bit latents. The format does not change. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The first CI run on this branch after the merge with master stopped at the style check and at `clang-tidy`: - `std::vector` is not allowed in `src/Compression`: the scratch buffers of the encoder and of the decoder are `VectorWithMemoryTracking` now, and the tables that are made once per process (logarithms, the folding of the classes) are plain arrays. - `clang-tidy` (51 diagnostics in `Wallaby.cpp`): `[[nodiscard]]` on the getters, initialized locals and members, one declaration per statement, range-based loops, `floor` for rounding, a redundant condition, an integer division in a floating-point context. - `clang-tidy` in the unit tests: `NOLINT` for the constant seeds, as in the other tests of the file, and no integer division in a floating-point context. The output of the codec does not change. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113575&sha=0f8da52720f1a4c103117839603002e744bf6440&name_0=PR #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ch merged with master The work continued on the previous base to keep a local build; this brings it on top of the merge with master. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…search - The conversion of floats to integers is a pass without branches and without dependencies between the values (it can be vectorized); the adjustments are computed in a second pass only for the chunks where some values are not reproduced exactly. - The search of the differencing order takes the median of every fourth residual of the sample, makes the histogram for the center only when the median is not zero, and stops after the first order when it is no better than no differencing. - The search over the pairs of parameters of the logarithmic bins walks the used classes in sorted order, where the classes of every pair are runs: no scratch histogram per pair. - The key and the count of a distinct value are stored together; the residuals of order 1 are made in one pass; the dictionary is chosen with a table of logarithms instead of two divisions per value. On the sampled corpus of 71 columns the sizes change by -0.002% in total and all the round trips are bit-exact; the ASan and UBSan harness passes at four block sizes. The format does not change. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…d with master #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The model with zero-run tokens was chosen whenever its estimated size was smaller, even by a fraction of a percent, and even when the runs were so short and rare that the stream kept 80-100% of its tokens. Such a stream gains nothing in the encoder and is decoded by the slower path for runs (tokens first, then their expansion). Now runs that remove less than a quarter of the tokens have to make the stream at least 2% smaller. On the sampled corpus the sizes grow by 0.04% in total (at most 0.5%, on `mgbench` columns that stay 1-40% below `PCO`), the affected columns decompress 10-35% faster, and the encoder is about 7% faster at the median. The format does not change. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…d with master #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
A review thread asked for decode tests with fixed bytes, so that the persisted format does not depend on what the current encoder happens to produce. The goldens that were added for the first format went away with the rewrite; this adds them for the format version 2. `WallabyTest.FixedPayloads` has 13 blocks made by the encoder when the format was fixed: a constant chunk, the division and the multiplication front-ends, `Float32` in single precision, bit patterns, `Float32` bit patterns of both signs (differences modulo 2^32), exceptions, zero runs, differences of a higher order, dictionary symbols, contexts, a verbatim block and a tail. Every block is decoded and compared bit-exactly with values recomputed by the test, and is checked to be rejected without its last byte. #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
#113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
# Conflicts: # src/Compression/tests/gtest_compressionCodec.cpp
The fixed payloads and the output of the decoder are little-endian streams, but `seriesBytes` and `compressAndCheck` in the unit tests built their bytes with a native-order `memcpy`, so `FixedPayloads` would fail on a big-endian host. Both now store every value with `unalignedStoreLittleEndian`. Nothing changes on little-endian hosts. Addresses the review in #113575 Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
🕵 Merged The two CI failures of the previous commit are not related to the codec:
@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113575&sha=377e71a74a798889d8b524863cabdecd0eaaaf9f&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%207%2F8%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. |
|
Findings for
|
Related: #66467
Related: #110613
Wallabyis an experimental lossless codec forFloat32andFloat64columns, enabled byenable_wallaby_codec.Motivation. The previous revision of this pull request bit-packed its integers and fell back to XOR, and
PCO(the pcodec crate, #110613) produced smaller data on 9 of 11 real columns. A new floating-point codec only makes sense if it is better than what is already there, so the codec is rewritten around an entropy coder with one goal: to be smaller than bothALPandPCOon every column, at a speed comparable toPCO.How it works. A block is split into chunks of up to 16384 values; every chunk is coded independently, with the method chosen by measuring.
Float32values can be reconstructed in single precision. Values that are slightly off the grid get adjustments (a distance in the order of bit patterns); values with no integer (NaN, infinities) or the few values that are off the grid become exceptions, which are removed from the sequence and coded separately.MergeTreecompressed block holds. This is the regime that matters here: compressing every 64 KiB block on its own costsPCO20-45% of the ratio it has on a whole column (measured for the previous revision of this description).The encoder ranks the candidates (front-end and differencing order) by a cheap proxy. For the best few it counts the exact values of the stream — in an array indexed by the value when the range is narrow, in a hash table when a sample has repeated values — and the bins, the dictionary and the size (within about 1%) follow from the distinct values without further passes over the data; the full work is done only for the winner.
Float32is processed in 32-bit integers throughout: the arithmetic on its latents is modulo 2^32. The decoder is a fused loop over tokens and raw bits, in batches, with the exceptions placed directly.The implementation is
src/Compression/Wallaby.cpp(the format is described at its top);CompressionCodecWallaby.cppis the codec glue. Nothing is shared with the previous revision, whose format-specific tests are replaced.Results. Measured inside ClickHouse with one binary for all the codecs (
clickhouse local,MergeTreewide parts,max_threads = 1, sparse serialization off so that every codec sees every value;PCOat its default level). Real columns are taken in full from the sample datasets: ClickBenchhits(numeric columns cast to floats, 100M rows),mgbenchmachine metrics (22M rows), environmental sensors (2019-06, 31M rows), NOAA weather (100M rows), cell towers (43M rows) and New York taxi trips (3M rows). The numbers are for this dataset and machine, not a general claim.Wallabyis smaller thanALPon 49 of 49 real columns and smaller thanPCOon 49 of 49. In total the 49 columns take 2032.1 MB withZSTD(3), 3303.9 MB withALP, 1704.5 MB withPCOand 1365.6 MB withWallaby: 19.9% less thanPCOand 58.7% less thanALP. Per column againstPCO: from -55.3% to -0.5%, median -24.0%.ALPon 24 and thanPCOon 23; in total 439.3 MB (ALP), 251.4 MB (PCO), 231.2 MB (Wallaby).rnd(Float64) vsPCO: +0.01% (uniformly random doubles, a few bytes per block).SELECTof the whole column): 7.51 s withPCOand 7.02 s withWallabyover the real columns (3.94 s withALP, 6.09 s withCODEC(NONE)).Wallabyis not slower thanPCOon 32 of 49 columns; per column it takes from 0.59x to 1.46x of the time ofPCO.INSERT, of which 12.1 s is the pipeline thatCODEC(NONE)also pays): 60.7 s withPCOand 51.1 s withWallaby(26.4 s withALP). On the 12Float64columnsWallabyis faster thanPCOin total (16.4 s against 22.0 s), and on the 37Float32columns it is faster thanPCO(34.8 s against 38.7 s). Per column it takes from 0.44x to 1.27x of the time ofPCO, and is not slower on 33 of 49.ALPremains much faster than both entropy coders (1.9x faster to insert and 1.8x faster to scan thanWallabyin total): it is bit-packing.Wallabyis for the columns where the size matters most.PCO(12), measured on a sample of 512 blocks of every column:Wallabyis smaller on 70 of 71 columns; the exception is the synthetic column of uniformly random doubles (+0.04%).Compressed size of the column, the smallest of the three floating-point codecs in bold:
ZSTD(3)ALPPCOWallabyALPPCOlat(Float64)lon(Float64)range(Float64)EventTime(Float64)RegionID(Float32)ResolutionWidth(Float32)SendTiming(Float32)UserID(Float64)bytes_in(Float32)bytes_out(Float32)cpu_idle(Float32)cpu_nice(Float32)cpu_system(Float32)cpu_user(Float32)cpu_wio(Float32)disk_free(Float32)disk_total(Float32)load_fifteen(Float32)load_five(Float32)load_one(Float32)mem_buffers(Float32)mem_cached(Float32)mem_free(Float32)mem_shared(Float32)part_max_used(Float32)swap_free(Float32)averageWindSpeed(Float32)elevation(Float32)maxWindSpeed(Float32)precipitation(Float32)snowDepth(Float32)snowfall(Float32)tempAvg(Float32)tempMax(Float32)tempMin(Float32)humidity(Float32)lat(Float32)lon(Float32)pressure(Float32)temperature(Float32)distance(Float32)distance(Float64)dropoff_lon(Float64)fare(Float64)pickup_lat(Float64)pickup_lon(Float64)tip(Float64)total(Float32)total(Float64)ZSTD(3)ALPPCOWallabyALPPCOcumsum(Float64)f32in64(Float64)fahrenheit(Float64)gauss(Float64)mixed2dp(Float64)mon(Float64)ms(Float64)mul001(Float32)mul01(Float64)prices2dp(Float64)randbits(Float64)randwalk3dp(Float64)repeats(Float64)rnd(Float64)rtn(Float64)seq(Float64)sine2dp(Float32)sine2dp(Float64)sinexp(Float64)smooth(Float32)smooth(Float64)sparse(Float64)special(Float64)thirds(Float64)Insert / select time of every column, seconds
The best of 2 inserts and of 3 scans, single thread;
CODEC(NONE)is the floor of the pipeline. The machine was shared with other jobs during the measurement, so differences of a few percent are noise.NONEZSTD(3)ALPPCOWallabylat(Float64)lon(Float64)range(Float64)EventTime(Float64)RegionID(Float32)ResolutionWidth(Float32)SendTiming(Float32)UserID(Float64)bytes_in(Float32)bytes_out(Float32)cpu_idle(Float32)cpu_nice(Float32)cpu_system(Float32)cpu_user(Float32)cpu_wio(Float32)disk_free(Float32)disk_total(Float32)load_fifteen(Float32)load_five(Float32)load_one(Float32)mem_buffers(Float32)mem_cached(Float32)mem_free(Float32)mem_shared(Float32)part_max_used(Float32)swap_free(Float32)averageWindSpeed(Float32)elevation(Float32)maxWindSpeed(Float32)precipitation(Float32)snowDepth(Float32)snowfall(Float32)tempAvg(Float32)tempMax(Float32)tempMin(Float32)humidity(Float32)lat(Float32)lon(Float32)pressure(Float32)temperature(Float32)distance(Float32)distance(Float64)dropoff_lon(Float64)fare(Float64)pickup_lat(Float64)pickup_lon(Float64)tip(Float64)total(Float32)total(Float64)NONEZSTD(3)ALPPCOWallabycumsum(Float64)f32in64(Float64)fahrenheit(Float64)gauss(Float64)mixed2dp(Float64)mon(Float64)ms(Float64)mul001(Float32)mul01(Float64)prices2dp(Float64)randbits(Float64)randwalk3dp(Float64)repeats(Float64)rnd(Float64)rtn(Float64)seq(Float64)sine2dp(Float32)sine2dp(Float64)sinexp(Float64)smooth(Float32)smooth(Float64)sparse(Float64)special(Float64)thirds(Float64)Robustness. The decoder validates all lengths, counts and indices, checks the final ANS states, does not depend on padding after the compressed data, and throws
CANNOT_DECOMPRESSon anything inconsistent. The standalone harness built from the production source with ASan and UBSan round-trips every block of the corpus at block sizes of 37, 517, 65536 and 300000 bytes, and decodes about a million truncated, bit-flipped and spliced blocks without a report. The unit tests cover round trips of series, sizes, tails and special values, the sizes of what the codec is made for, truncation, corruption and malformed headers, and they pin the format with 13 fixed blocks (every chunk mode and front-end) that are decoded independently of the current encoder;wallaby_decompress_fuzzercovers the decoder in CI.Patent note. The mantissa-erasure preprocessing shared by
Elf,Elf+,SElf*andKangaroois covered by patent US 12,289,120 B2 (Chongqing University, granted 2025-04-29), including the decompression side;Wallabydoes not implement it. The building blocks are prior art or openly licensed: integerization of decimals (ALP, MIT), division and multiplication modes (the idea behind pcodec'sFloatMult, Apache-2.0; the implementation here is original), differencing, dictionaries, and tANS (Jarek Duda, public domain; the table construction follows the published FSE scheme). No code is taken from pcodec; the on-disk format is original.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added the experimental
Wallabylossless compression codec forFloat32andFloat64columns. It turns the values into integers (decimals and other rational grids, or bit patterns), removes what is predictable with differences, and codes the rest with an entropy coder whose alphabet is fitted to the block. On the tested real-world columns it is smaller than bothALPandPCO. Gated behind theenable_wallaby_codecsetting.Documentation entry for user-facing changes
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/113575]