Skip to content

Adaptive Compression Codec Selection - #105945

Closed
rienath wants to merge 58 commits into
masterfrom
adaptive-codec-selection
Closed

rienath wants to merge 58 commits into
masterfrom
adaptive-codec-selection

Conversation

@rienath

@rienath rienath commented May 27, 2026 •

Copy link
Copy Markdown
Member

@rienath rienath changed the title [WIP [WIP] Adaptive Compression Codec Selection May 27, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [92a8cda]

@clickhouse-gh clickhouse-gh Bot added the pr-experimental Experimental Feature label May 27, 2026
Comment thread src/Compression/CompressionCodecT64.cpp Resolved
Add a write buffer that reports the on-disk size its input would compress to. It uses tryGetCompressedSize when the codec can predict its size cheaply (T64), and falls back to actual compression otherwise. The estimateCompressionRatio now uses it instead of compressing through a discarded NullWriteBuffer
CompressionCodecAdaptive::compress now runs AdaptiveCodec::select on every block instead of short-circuiting to the deployment default below a size threshold. The skip_threshold member is removed. It's not worth keeping: per-block selection cost scales with the block, so small blocks are the cheapest to evaluate, and strict-min selection with the deployment default at  already falls back to the default whenever a candidate's header overhead would make it lose. A floor only saved the cost of confirming the default, which is smallest exactly where it applied.
Comment thread src/Storages/MergeTree/MutateTask.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.40% 85.50% +0.10%
Functions 92.60% 92.60% +0.00%
Branches 77.70% 77.70% +0.00%

Changed lines: Changed C/C++ lines covered: 766/805 (95.16%) · Uncovered code

Full report · Diff report

@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟢 Ready View Preview Jul 20, 2026, 2:33 PM

@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟡 Building – Jul 20, 2026, 2:08 PM

@rienath rienath changed the title [WIP] Adaptive Compression Codec Selection Adaptive Compression Codec Selection Aug 3, 2026
@rienath

rienath commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Closing as experimental feature was shipped

@rienath rienath closed this Aug 3, 2026
rorylshanks pushed a commit to rorylshanks/ClickHouse that referenced this pull request Aug 4, 2026
Explicit heading anchors must use kebab-case per docs/README.md
(`# Title {#anchor-name}`). Fix anchors that used underscores as word
separators where the heading auto-slug uses hyphens, e.g.
`## Returned value {#returned_value}` -> `{#returned-value}`.

Scope: anchors equal to the heading auto-slug except for _ vs -.
60 heading anchors across 51 files plus 25 internal links that point to
them updated together. Code-identifier anchors (settings, codecs,
metrics) and legacy namespace-prefixed stable IDs are left unchanged.

Requested in ClickHouse#105945.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

This branch was successfully deployed

1 active deployment
staging - docs — 92a8cda5 Deployed Aug 3, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-experimental Experimental Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant