Repository navigation
Speed up estimateCompressionRatio for T64-encoded columns - #109054
Conversation
|
Workflow [PR], commit [0448fda] Summary: ✅
AI ReviewSummaryThis PR replaces the aggregate's Final VerdictStatus: ✅ Approve |
|
📊 Cloud Performance Report ✅ AI verdict: This PR is scoped entirely to the T64 compression codec (adding tryGetCompressedSize) and the estimateCompressionRatio aggregate (a new CompressedSizeCalculator), plus tests. None of the three flagged queries exercise those code paths: ClickBench Q15 and Q32 and TPC-H Q4 are ordinary SELECTs over standard-codec data that never call estimateCompressionRatio. The ClickBench deltas were already suppressed/held as noise deterministically, and I downgraded the flagged TPC-H Q4 regression (+7.4%) to not_sure because the diff cannot touch what it runs and that query is intrinsically noisy. No genuine PR-attributable regression or improvement is visible in these results. clickbenchFlagged queries (1 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_officialFlagged queries (1 of 22)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. Debug info
|
Empty offset is already checked in the caller (WriteBuffer)
rienath
left a comment
There was a problem hiding this comment.
Thanks for the detailed review, I addressed all the comments.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 159/183 (86.89%) · Uncovered code |
…mation Speed up `estimateCompressionRatio` for `T64`-encoded columns
It now computes the compressed size analytically instead of compressing, with the same result.
Under the hood this adds a codec size primitive,
ICompressionCodec::tryGetCompressedSize(exact size, orstd::nulloptwhen it cannot be computed cheaply), and aCompressedSizeCalculatorbuffer that uses it. This is the "measured size" primitive from the adaptive codec selection RFC (#105404), which the per-block selector will use to compare candidates. Adaptive selection itself is not part of this PR, but the infrastructure added in this PR is a must for it.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Speed up
estimateCompressionRatioforT64-encoded columns by computing the compressed size analytically instead of compressing.Version info
26.7.1.1161(included in26.7and later)