Conversation
Polar Signals Profiling ResultsLatest Run
Previous Runs (7)
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 1.008x ➖ datafusion / vortex-file-compressed (1.008x ➖, 0↑ 0↓)
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) datafusion / vortex-file-compressed (1.027x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.019x ➖, 0↑ 0↓)
datafusion / parquet (1.028x ➖, 0↑ 1↓)
datafusion / arrow (1.093x ➖, 0↑ 11↓)
duckdb / vortex-file-compressed (1.030x ➖, 0↑ 1↓)
duckdb / vortex-compact (1.035x ➖, 0↑ 0↓)
duckdb / parquet (1.018x ➖, 0↑ 1↓)
duckdb / duckdb (1.046x ➖, 0↑ 1↓)
Full attributed analysis
|
Benchmarks: TPC-H SF=1 on S3Verdict: No clear signal (environment too noisy confidence) datafusion / vortex-file-compressed (0.893x ➖, 5↑ 0↓)
datafusion / vortex-compact (1.009x ➖, 1↑ 1↓)
datafusion / parquet (1.133x ➖, 0↑ 7↓)
duckdb / vortex-file-compressed (1.011x ➖, 1↑ 0↓)
duckdb / vortex-compact (1.064x ➖, 0↑ 1↓)
duckdb / parquet (1.051x ➖, 0↑ 2↓)
Full attributed analysis
|
Benchmarks: FineWeb S3Verdict: No clear signal (environment too noisy confidence) datafusion / vortex-file-compressed (0.804x ➖, 2↑ 0↓)
datafusion / vortex-compact (0.824x ➖, 2↑ 0↓)
datafusion / parquet (0.830x ➖, 2↑ 0↓)
duckdb / vortex-file-compressed (0.947x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.985x ➖, 0↑ 0↓)
duckdb / parquet (1.020x ➖, 0↑ 0↓)
Full attributed analysis
|
Benchmarks: Clickbench on NVMEVerdict: No clear signal (environment too noisy confidence) datafusion / vortex-file-compressed (0.941x ➖, 15↑ 0↓)
datafusion / parquet (0.952x ➖, 12↑ 1↓)
duckdb / vortex-file-compressed (0.929x ➖, 14↑ 2↓)
duckdb / parquet (0.970x ➖, 0↑ 0↓)
duckdb / duckdb (0.944x ➖, 5↑ 0↓)
Full attributed analysis
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) duckdb / vortex-file-compressed (0.950x ➖, 1↑ 0↓)
duckdb / vortex-compact (1.032x ➖, 0↑ 1↓)
duckdb / parquet (0.964x ➖, 0↑ 0↓)
Full attributed analysis
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (environment too noisy confidence) datafusion / vortex-file-compressed (0.994x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.990x ➖, 0↑ 0↓)
datafusion / parquet (1.011x ➖, 1↑ 3↓)
datafusion / arrow (1.006x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed (1.018x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.007x ➖, 0↑ 0↓)
duckdb / parquet (1.000x ➖, 2↑ 2↓)
duckdb / duckdb (1.006x ➖, 0↑ 0↓)
Full attributed analysis
|
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) datafusion / vortex-file-compressed (0.860x ✅, 4↑ 0↓)
datafusion / vortex-compact (0.935x ➖, 0↑ 0↓)
datafusion / parquet (0.901x ➖, 4↑ 0↓)
duckdb / vortex-file-compressed (0.915x ➖, 3↑ 0↓)
duckdb / vortex-compact (0.900x ✅, 3↑ 0↓)
duckdb / parquet (0.921x ➖, 2↑ 0↓)
Full attributed analysis
|
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) datafusion / vortex-file-compressed (0.843x ✅, 94↑ 0↓)
datafusion / vortex-compact (0.908x ➖, 46↑ 2↓)
datafusion / parquet (0.898x ✅, 50↑ 0↓)
duckdb / vortex-file-compressed (1.023x ➖, 9↑ 16↓)
duckdb / vortex-compact (1.084x ➖, 3↑ 36↓)
duckdb / parquet (1.011x ➖, 0↑ 2↓)
duckdb / duckdb (1.016x ➖, 1↑ 1↓)
Full attributed analysis
|
Benchmarks: Random AccessVortex (geomean): 0.946x ➖ unknown / unknown (1.032x ➖, 7↑ 21↓)
|
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) datafusion / vortex-file-compressed (0.909x ➖, 2↑ 1↓)
datafusion / vortex-compact (0.783x ➖, 7↑ 0↓)
datafusion / parquet (0.627x ✅, 15↑ 0↓)
duckdb / vortex-file-compressed (0.941x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.969x ➖, 0↑ 0↓)
duckdb / parquet (0.928x ➖, 0↑ 1↓)
Full attributed analysis
|
Benchmarks: CompressionVortex (geomean): 1.000x ➖ unknown / unknown (0.987x ➖, 11↑ 9↓)
|
32cd06a to
45acd04
Compare
6887c12 to
b8ec852
Compare
a7be89a to
7c6a0f5
Compare
| let estimate = estimate_callback(self, data, ctx.clone())?; | ||
|
|
||
| match estimate { | ||
| CompressionEstimate::Skip => {} | ||
| CompressionEstimate::AlwaysUse => return Ok(Some(scheme)), | ||
| CompressionEstimate::Ratio(ratio) => { | ||
| if is_better_ratio(ratio, &best) { | ||
| best = Some((scheme, ratio)); | ||
| } | ||
| } | ||
| e @ (CompressionEstimate::Sample | CompressionEstimate::Estimate(_)) => { | ||
| vortex_panic!( | ||
| "an estimation function returned an invalid variant {e:?}" | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
We probably want the estimate_callback to return something else other than CompressionEstimate, maybe call it ResolvedEstimate.
|
Maybe in a follow up or maybe before, shall we add to the size of all files for all sql benchmarks. |
|
Did you expect to a load of size wins |
|
To be honest I have no idea what the compressor is actually choosing, I just changed the logic in a way that makes sense to me rather than figuring out what is best for performance. |
5ad9c52 to
7931da7
Compare
|
That comment doesn't inspire confidence in this change |
|
I think you should look at diff of file sizes for all benchmarks before we merge this? |
|
Well that's part of the reason for this change, we want to move towards having better introspection to the compressor by making its behavior more understandable. I'm happy to go all the way (smarter logic for what schemes we try first, better I'm going to bench things locally rather than rely on the CI here because I frankly do not trust any of the numbers (other than the compression size which is the same or better). |
|
I think we should add file size measures for all sql benchmarks |
|
I really just don't trust our SQL benchmarks on PRs at all. I've ran it several times here and every time it is a completely different result. This past time there were more regressions, but that happened for Parquet as well. I think these are just way too noisy to be useful unless EVERYTHING clearly regresses across all benchmarks. To validate, I ran everything locally on my x86 linux machine, and I only saw improvements in file size. I am currently running the runtime benchmarks comparison now. This file size and array tree report is generated by claude but I am pretty confident it is correct because I ran the commands myself. DetailsTPCH SF10 File Size Comparison:
|
| File | Branch (bytes) | Develop (bytes) | Delta | % Change |
|---|---|---|---|---|
| customer_0 | 109,632,916 | 109,638,340 | -5,424 | -0.005% |
| lineitem_0 | 141,498,968 | 141,501,928 | -2,960 | -0.002% |
| lineitem_1 | 141,175,136 | 141,178,464 | -3,328 | -0.002% |
| lineitem_2 | 141,236,712 | 141,239,568 | -2,856 | -0.002% |
| lineitem_3 | 140,773,056 | 140,777,008 | -3,952 | -0.003% |
| lineitem_4 | 141,293,360 | 141,296,480 | -3,120 | -0.002% |
| lineitem_5 | 140,903,880 | 140,907,832 | -3,952 | -0.003% |
| lineitem_6 | 140,373,752 | 140,378,328 | -4,576 | -0.003% |
| lineitem_7 | 140,951,792 | 140,955,328 | -3,536 | -0.003% |
| lineitem_8 | 140,996,280 | 140,999,816 | -3,536 | -0.003% |
| lineitem_9 | 141,439,592 | 141,442,296 | -2,704 | -0.002% |
| lineitem_10 | 141,383,744 | 141,386,864 | -3,120 | -0.002% |
| lineitem_11 | 141,610,176 | 141,612,672 | -2,496 | -0.002% |
| lineitem_12 | 141,390,000 | 141,393,120 | -3,120 | -0.002% |
| nation_0 | 8,032 | 8,704 | -672 | -7.72% |
| orders_0 | 171,523,868 | 171,697,428 | -173,560 | -0.10% |
| orders_1 | 171,752,756 | 171,800,308 | -47,552 | -0.03% |
| orders_2 | 171,587,564 | 171,711,900 | -124,336 | -0.07% |
| part_0 | 28,270,320 | 28,274,224 | -3,904 | -0.01% |
| part_1 | 28,235,864 | 28,239,768 | -3,904 | -0.01% |
| partsupp_0 | 188,516,296 | 188,516,336 | -40 | -0.00% |
| partsupp_1 | 188,699,112 | 188,699,136 | -24 | -0.00% |
| region_0 | 4,844 | 5,260 | -416 | -7.91% |
| supplier_0 | 6,995,400 | 6,995,784 | -384 | -0.01% |
| Total | 2,900,253,420 | 2,900,656,892 | -403,472 | -0.014% |
Branch is 403 KB smaller overall (-0.014%). Every file is equal or smaller.
Compact Format (vortex-compact)
| File | Branch (bytes) | Develop (bytes) | Delta | % Change |
|---|---|---|---|---|
| customer_0 | 77,604,740 | 77,604,740 | 0 | 0.000% |
| lineitem_0 | 105,267,688 | 105,267,688 | 0 | 0.000% |
| lineitem_1 | 105,324,192 | 105,318,688 | +5,504 | +0.005% |
| lineitem_2 | 105,264,840 | 105,259,336 | +5,504 | +0.005% |
| lineitem_3 | 105,295,552 | 105,290,048 | +5,504 | +0.005% |
| lineitem_4 | 105,227,424 | 105,227,424 | 0 | 0.000% |
| lineitem_5 | 105,376,392 | 105,376,392 | 0 | 0.000% |
| lineitem_6 | 105,372,336 | 105,355,832 | +16,504 | +0.016% |
| lineitem_7 | 105,260,576 | 105,255,080 | +5,496 | +0.005% |
| lineitem_8 | 105,276,392 | 105,265,384 | +11,008 | +0.010% |
| lineitem_9 | 105,131,256 | 105,131,256 | 0 | 0.000% |
| lineitem_10 | 105,299,184 | 105,293,680 | +5,504 | +0.005% |
| lineitem_11 | 105,200,696 | 105,195,184 | +5,512 | +0.005% |
| lineitem_12 | 105,303,320 | 105,297,808 | +5,512 | +0.005% |
| nation_0 | 6,168 | 6,840 | -672 | -9.82% |
| orders_0 | 120,127,588 | 120,127,588 | 0 | 0.000% |
| orders_1 | 120,096,156 | 120,096,156 | 0 | 0.000% |
| orders_2 | 120,117,156 | 120,117,156 | 0 | 0.000% |
| part_0 | 18,934,712 | 18,934,712 | 0 | 0.000% |
| part_1 | 18,935,656 | 18,935,656 | 0 | 0.000% |
| partsupp_0 | 132,812,400 | 132,812,400 | 0 | 0.000% |
| partsupp_1 | 132,790,680 | 132,790,680 | 0 | 0.000% |
| region_0 | 4,340 | 4,756 | -416 | -8.75% |
| supplier_0 | 4,945,512 | 4,945,512 | 0 | 0.000% |
| Total | 2,114,974,956 | 2,114,909,996 | +64,960 | +0.003% |
Branch is 65 KB larger overall (+0.003%). Effectively noise.
Encoding Differences (Array Tree Analysis)
For files with layout tree differences, we materialized the full array encoding trees and diffed them. Three patterns explain all observed changes:
1. FoR eliminates bitpack patches (lineitem l_orderkey run-ends, all default partitions)
Branch wraps bitpacked run-end offsets in Frame-of-Reference, which shifts the value range down so all values fit without patches:
Branch: ends: fastlanes.for(u32) -> fastlanes.bitpacked(u32, bit_width=17, patches: None)
Develop: ends: fastlanes.bitpacked(u32, bit_width=17, patches: Some(...))
+ patch_indices (2 B) + patch_values (4 B) + patch_chunk_offsets (32 B)
FoR subtracts base=6, so max 131072 becomes 131066 which fits in 17 bits. Without FoR, 131072 requires a patch. Net savings: ~38 bytes/chunk metadata overhead for patches, repeated across every chunk in every lineitem partition.
2. FSST chosen over dict+FSST for o_clerk (orders, some chunks)
Branch: o_clerk: vortex.fsst(utf8, len=8192) -- 33.88 kB
Develop: o_clerk: vortex.dict(utf8, len=8192) -- 36.65 kB
codes: fastlanes.bitpacked(u16, bit_width=13) -- 13.31 kB
values: vortex.fsst(utf8, len=5562) -- 23.34 kB
Branch correctly identifies that FSST alone (33.88 kB) beats dict+FSST (36.65 kB) for the o_clerk column which has 5562 distinct values across 8192 rows (68% unique). This is the primary driver of the ~170 KB/file savings on orders.
3. FoR wrapping on o_orderkey (orders, all chunks)
Branch: o_orderkey: fastlanes.for(i64) -> fastlanes.bitpacked(i64, bit_width=19)
Develop: o_orderkey: fastlanes.bitpacked(i64, bit_width=19)
Same buffer size (19.46 kB) -- FoR adds a small metadata scalar but no extra buffer. Neutral to slightly beneficial.
4. Dict vs PCO for l_quantity MSP (compact lineitem, rare chunks)
Branch: msp: vortex.dict(i16, len=8192) -> codes: bitpacked(u8) + values: pco(i16) -- 6.17 kB
Develop: msp: vortex.pco(i16, len=8192) -- 92.79 kB
Branch picks dictionary encoding for the decimal quantity MSP which is dramatically better for this specific chunk (15x). However, this only occurs in a few isolated chunks within the compact format, and the net file-level effect is negligible.
Summary
- Default format: Branch is 403 KB smaller (-0.014%). No regressions.
- Compact format: Branch is 65 KB larger (+0.003%). Effectively identical.
- All encoding changes are explainable and reasonable. The estimation rework produces equal or better compression decisions on TPCH SF10.
|
what happened to |
|
Edit: Whoops I forgot to rebase on develop so the runtime results are not reliable |
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
7931da7 to
6821f7f
Compare
|
Ok yeah there are effectively no regressions. I ran the both versions of files against both my branch and develop and there is no difference. I think the earlier regressions was from the regression we saw that was recently fixed. DetailsTPCH SF10 Runtime Comparison:
|
| Query | Branch (ms) | Develop (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 466.7 | 468.5 | -1.8 | -0.4% |
| tpch_q02 | 152.8 | 152.4 | +0.3 | +0.2% |
| tpch_q03 | 318.6 | 320.8 | -2.1 | -0.7% |
| tpch_q04 | 121.5 | 124.0 | -2.5 | -2.0% |
| tpch_q05 | 635.9 | 630.2 | +5.7 | +0.9% |
| tpch_q06 | 62.3 | 61.7 | +0.6 | +1.0% |
| tpch_q07 | 893.6 | 904.1 | -10.5 | -1.2% |
| tpch_q08 | 620.3 | 613.6 | +6.7 | +1.1% |
| tpch_q09 | 1145.8 | 1137.2 | +8.6 | +0.8% |
| tpch_q10 | 360.3 | 359.1 | +1.2 | +0.3% |
| tpch_q11 | 124.9 | 125.5 | -0.6 | -0.5% |
| tpch_q12 | 148.8 | 150.6 | -1.7 | -1.1% |
| tpch_q13 | 201.0 | 203.4 | -2.4 | -1.2% |
| tpch_q14 | 83.9 | 84.5 | -0.6 | -0.7% |
| tpch_q15 | 158.9 | 155.8 | +3.1 | +2.0% |
| tpch_q16 | 101.0 | 100.2 | +0.8 | +0.8% |
| tpch_q17 | 982.8 | 981.3 | +1.5 | +0.2% |
| tpch_q18 | 1300.9 | 1299.8 | +1.1 | +0.1% |
| tpch_q19 | 87.6 | 88.0 | -0.4 | -0.5% |
| tpch_q20 | 261.4 | 258.3 | +3.1 | +1.2% |
| tpch_q21 | 974.0 | 989.0 | -15.0 | -1.5% |
| tpch_q22 | 61.8 | 60.8 | +1.0 | +1.6% |
End-to-end — Compact (vortex-compact)
| Query | Branch (ms) | Develop (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 462.4 | 466.8 | -4.4 | -1.0% |
| tpch_q02 | 157.5 | 156.9 | +0.7 | +0.4% |
| tpch_q03 | 309.3 | 311.4 | -2.1 | -0.7% |
| tpch_q04 | 122.4 | 122.9 | -0.6 | -0.5% |
| tpch_q05 | 624.5 | 623.0 | +1.5 | +0.2% |
| tpch_q06 | 65.5 | 63.0 | +2.4 | +3.9% |
| tpch_q07 | 886.2 | 894.6 | -8.4 | -0.9% |
| tpch_q08 | 610.4 | 608.3 | +2.1 | +0.3% |
| tpch_q09 | 1143.7 | 1128.1 | +15.6 | +1.4% |
| tpch_q10 | 361.8 | 367.4 | -5.6 | -1.5% |
| tpch_q11 | 129.3 | 128.2 | +1.0 | +0.8% |
| tpch_q12 | 173.4 | 173.0 | +0.4 | +0.2% |
| tpch_q13 | 213.6 | 215.4 | -1.8 | -0.8% |
| tpch_q14 | 89.0 | 91.2 | -2.3 | -2.5% |
| tpch_q15 | 191.0 | 188.2 | +2.8 | +1.5% |
| tpch_q16 | 106.4 | 107.9 | -1.5 | -1.4% |
| tpch_q17 | 973.4 | 977.7 | -4.4 | -0.4% |
| tpch_q18 | 1271.3 | 1269.5 | +1.8 | +0.1% |
| tpch_q19 | 111.2 | 110.7 | +0.6 | +0.5% |
| tpch_q20 | 258.5 | 262.2 | -3.7 | -1.4% |
| tpch_q21 | 951.9 | 966.8 | -14.9 | -1.5% |
| tpch_q22 | 64.8 | 67.5 | -2.8 | -4.1% |
2. File differences only: branch files vs develop files (same develop binary)
Same binary (develop) — Default (vortex-file-compressed)
| Query | Branch files (ms) | Develop files (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 464.0 | 468.5 | -4.5 | -1.0% |
| tpch_q02 | 151.8 | 152.4 | -0.6 | -0.4% |
| tpch_q03 | 320.4 | 320.8 | -0.3 | -0.1% |
| tpch_q04 | 126.5 | 124.0 | +2.5 | +2.0% |
| tpch_q05 | 638.7 | 630.2 | +8.5 | +1.4% |
| tpch_q06 | 61.7 | 61.7 | +0.0 | +0.0% |
| tpch_q07 | 898.8 | 904.1 | -5.3 | -0.6% |
| tpch_q08 | 610.2 | 613.6 | -3.4 | -0.5% |
| tpch_q09 | 1138.8 | 1137.2 | +1.6 | +0.1% |
| tpch_q10 | 357.6 | 359.1 | -1.4 | -0.4% |
| tpch_q11 | 124.2 | 125.5 | -1.3 | -1.1% |
| tpch_q12 | 152.3 | 150.6 | +1.8 | +1.2% |
| tpch_q13 | 201.7 | 203.4 | -1.7 | -0.8% |
| tpch_q14 | 85.5 | 84.5 | +1.0 | +1.1% |
| tpch_q15 | 157.4 | 155.8 | +1.6 | +1.0% |
| tpch_q16 | 103.3 | 100.2 | +3.1 | +3.1% |
| tpch_q17 | 984.6 | 981.3 | +3.3 | +0.3% |
| tpch_q18 | 1298.1 | 1299.8 | -1.7 | -0.1% |
| tpch_q19 | 87.3 | 88.0 | -0.6 | -0.7% |
| tpch_q20 | 257.6 | 258.3 | -0.7 | -0.3% |
| tpch_q21 | 976.3 | 989.0 | -12.7 | -1.3% |
| tpch_q22 | 60.2 | 60.8 | -0.6 | -1.0% |
Same binary (develop) — Compact (vortex-compact)
| Query | Branch files (ms) | Develop files (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 468.8 | 466.8 | +2.0 | +0.4% |
| tpch_q02 | 156.8 | 156.9 | -0.1 | -0.1% |
| tpch_q03 | 308.2 | 311.4 | -3.1 | -1.0% |
| tpch_q04 | 121.8 | 122.9 | -1.1 | -0.9% |
| tpch_q05 | 623.8 | 623.0 | +0.8 | +0.1% |
| tpch_q06 | 63.2 | 63.0 | +0.1 | +0.2% |
| tpch_q07 | 889.0 | 894.6 | -5.6 | -0.6% |
| tpch_q08 | 610.8 | 608.3 | +2.5 | +0.4% |
| tpch_q09 | 1123.5 | 1128.1 | -4.6 | -0.4% |
| tpch_q10 | 363.6 | 367.4 | -3.8 | -1.0% |
| tpch_q11 | 128.5 | 128.2 | +0.3 | +0.2% |
| tpch_q12 | 170.1 | 173.0 | -2.9 | -1.7% |
| tpch_q13 | 214.1 | 215.4 | -1.3 | -0.6% |
| tpch_q14 | 89.3 | 91.2 | -1.9 | -2.1% |
| tpch_q15 | 187.9 | 188.2 | -0.3 | -0.1% |
| tpch_q16 | 109.1 | 107.9 | +1.2 | +1.1% |
| tpch_q17 | 975.0 | 977.7 | -2.7 | -0.3% |
| tpch_q18 | 1278.1 | 1269.5 | +8.6 | +0.7% |
| tpch_q19 | 110.4 | 110.7 | -0.3 | -0.2% |
| tpch_q20 | 260.5 | 262.2 | -1.7 | -0.6% |
| tpch_q21 | 976.9 | 966.8 | +10.1 | +1.0% |
| tpch_q22 | 67.1 | 67.5 | -0.5 | -0.7% |
3. Binary differences only: branch binary vs develop binary (same develop files)
Same files (develop) — Default (vortex-file-compressed)
| Query | Branch binary (ms) | Develop binary (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 477.4 | 468.5 | +8.9 | +1.9% |
| tpch_q02 | 151.5 | 152.4 | -0.9 | -0.6% |
| tpch_q03 | 320.3 | 320.8 | -0.5 | -0.1% |
| tpch_q04 | 123.0 | 124.0 | -1.0 | -0.8% |
| tpch_q05 | 643.1 | 630.2 | +12.9 | +2.0% |
| tpch_q06 | 63.7 | 61.7 | +2.0 | +3.3% |
| tpch_q07 | 896.4 | 904.1 | -7.7 | -0.8% |
| tpch_q08 | 614.6 | 613.6 | +1.0 | +0.2% |
| tpch_q09 | 1138.3 | 1137.2 | +1.1 | +0.1% |
| tpch_q10 | 357.7 | 359.1 | -1.3 | -0.4% |
| tpch_q11 | 125.4 | 125.5 | -0.2 | -0.1% |
| tpch_q12 | 148.7 | 150.6 | -1.9 | -1.3% |
| tpch_q13 | 202.1 | 203.4 | -1.3 | -0.6% |
| tpch_q14 | 84.7 | 84.5 | +0.2 | +0.3% |
| tpch_q15 | 157.9 | 155.8 | +2.1 | +1.3% |
| tpch_q16 | 101.0 | 100.2 | +0.8 | +0.8% |
| tpch_q17 | 981.4 | 981.3 | +0.2 | +0.0% |
| tpch_q18 | 1308.1 | 1299.8 | +8.3 | +0.6% |
| tpch_q19 | 86.2 | 88.0 | -1.7 | -2.0% |
| tpch_q20 | 258.8 | 258.3 | +0.5 | +0.2% |
| tpch_q21 | 971.6 | 989.0 | -17.4 | -1.8% |
| tpch_q22 | 60.9 | 60.8 | +0.2 | +0.3% |
Same files (develop) — Compact (vortex-compact)
| Query | Branch binary (ms) | Develop binary (ms) | Delta (ms) | % Change |
|---|---|---|---|---|
| tpch_q01 | 466.9 | 466.8 | +0.1 | +0.0% |
| tpch_q02 | 157.4 | 156.9 | +0.6 | +0.4% |
| tpch_q03 | 311.3 | 311.4 | -0.1 | -0.0% |
| tpch_q04 | 124.5 | 122.9 | +1.6 | +1.3% |
| tpch_q05 | 628.5 | 623.0 | +5.5 | +0.9% |
| tpch_q06 | 65.2 | 63.0 | +2.2 | +3.5% |
| tpch_q07 | 894.3 | 894.6 | -0.3 | -0.0% |
| tpch_q08 | 607.5 | 608.3 | -0.9 | -0.1% |
| tpch_q09 | 1125.7 | 1128.1 | -2.4 | -0.2% |
| tpch_q10 | 362.3 | 367.4 | -5.1 | -1.4% |
| tpch_q11 | 126.9 | 128.2 | -1.3 | -1.0% |
| tpch_q12 | 174.9 | 173.0 | +1.9 | +1.1% |
| tpch_q13 | 210.7 | 215.4 | -4.6 | -2.1% |
| tpch_q14 | 90.4 | 91.2 | -0.8 | -0.8% |
| tpch_q15 | 190.3 | 188.2 | +2.1 | +1.1% |
| tpch_q16 | 108.8 | 107.9 | +0.9 | +0.8% |
| tpch_q17 | 978.4 | 977.7 | +0.6 | +0.1% |
| tpch_q18 | 1266.4 | 1269.5 | -3.1 | -0.2% |
| tpch_q19 | 110.5 | 110.7 | -0.2 | -0.2% |
| tpch_q20 | 261.5 | 262.2 | -0.7 | -0.3% |
| tpch_q21 | 955.5 | 966.8 | -11.2 | -1.2% |
| tpch_q22 | 64.7 | 67.5 | -2.9 | -4.3% |
|
Thanks for confirming, I will have a look tomorrow |


Summary
Tracking Issue: #7216
Adds a new
CompressionEstimatetype invortex-compressor/src/estimate.rsthat theexpected_compression_ratiomethod now returns. Additionally moves some things around for clarity.Note that this is not just a refactor, there is subtle logic that has changed in a few places (that I think is better, not actually sure). I'm happy to split out some stuff into other PRs if that helps.
Future Work
Exactthat returns the fully compressed array in the case that we can only determine if a scheme is a candidate by compressing the whole thing without any errors; the only case where we want to do this isSequenceArray(and maybe there's an argument to do this forConstantArraytoo, but the semantics aroundConstantArrayshould be even more special regardless, imo).ResolvedEstimateenum instead.ConstantSchemelogic into the compressor since I cannot think of any reason why you would not want to have aConstantScheme(except when you have a very small array, and at that point you don't care about perf regardless).API Changes
expected_compression_rationow only takes stats and compressor context (it does not take the compressor at all) and returns aCompressionEstimate. This method must be super quick, and any sampling or expensive operations are now deferred to later by the compressor.Testing
Just a few extra tests, am relying on the existing test suite as it's not like completely new logic is happening.