Repository navigation
Conversation
4b9303c to
cb15d53
Compare
Keep the footer-sharing change current with master.
The cached V3 flow populates only shared_file_metadata, so prepareBloomFilterCondition and the dictionary-value hashing read an empty by-value file_metadata member and throw std::out_of_range in makeColumnDescriptor. Caught by the warm-perf point lookup on the validation branch. Fix applies to PR ClickHouse#115877 as well.
When the footer comes from the shared metadata cache, the by-value file_metadata member is empty; prepareBloomFilterCondition and the dictionary-value hashing then throw std::out_of_range in makeColumnDescriptor. Found by the warm-perf point lookup on the validation branch.
…ction Its file_metadata parameter is legitimately used; only the member-function bloom-filter path needs getFileMetadata().
|
Workflow [PR], commit [3d8499a] Summary: ✅
AI ReviewSummaryThis PR changes the Parquet V3 reader to retain footer metadata through shared ownership instead of deep-copying cached footers per reader, and it updates the remaining bloom-filter and dictionary-pruning carriers to read through that shared metadata. The current diff and discussion look consistent with that contract, and the added regression coverage now exercises the cache-hit pruning paths that originally broke. Final Verdict✅ No new issues found in the current PR state. LLVM Coverage ReportMeasured on commit 3d8499a.
Changed lines: Changed C/C++ lines covered: 94/101 (93.07%) · Uncovered code |
| String etag = object_with_metadata->metadata->etag; | ||
| ParquetMetadataCacheKey cache_key = ParquetMetadataCache::createKey(file_name, etag); | ||
| return metadata_cache->getOrSetMetadata( | ||
| return metadata_cache->getOrSetMetadataPtr( |
There was a problem hiding this comment.
I think it was already common as there was a cache, but making metadata as a pointer seems good (as we don't need to copy it anymore)
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units20 translation units recompiled, 213 s compile time in total, 20 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.06 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
The cached V3 flow leaves the by-value file_metadata member empty, and the bloom-filter and dictionary pruning paths used to read it, throwing std::out_of_range in makeColumnDescriptor on the second (cache-hit) read. This test reads both paths twice and asserts identical results plus a ParquetMetadataCacheHits on the cache-hit read.
…dation tree Mirrors the PR ClickHouse#115877 fix; the stateless CI job on the validation branch will run it.
- tag no-fasttest: the fast-test build has no Parquet format - add current_database = currentDatabase() to the query_log reads (style check)
|
📊 Cloud Performance Report ✅ AI verdict: The only flagged query is tpch_adapted_1_official Q17, provisionally an improvement of -34.0%. This PR is scoped entirely to the ParquetV3 reader's file-metadata sharing/caching (making the cached footer a shared_ptr so cache-hit reads reuse immutable metadata) plus a new test. TPC-H Q17 executes against native MergeTree tables and touches no Parquet code path, so a real speedup here is not plausible; combined with the query's noisy history, the delta reads as run-to-run variance. Downgraded to not_sure. clickbench🟢 No significant changes 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
|
…the test comment Reviewer feedback asked for a self-pass over the diff for idiomatic patterns and redundant comments.
The loongarch64 build compiles without Parquet, where the header is empty and the test fails with undeclared identifiers.
|
@rienath upstream CI is fully green on this one, and the fork validation is green as well: full build, all stateless tests, and the warm-perf harness on the public dataset (numbers in #116235). I've also added the regression test the AI review asked for (cached footer + bloom and dictionary pruning) and done a self-review pass over the diff. |
Replace debug-only `chassert` guards in `ManifestFilesPruner::partitionFilterHash` with real `LOGICAL_ERROR` checks on the `KeyCondition` `RPN` (`AND`/`OR`/`NOT`), so a malformed stack throws an exception in release builds instead of causing undefined behavior. Document only, no behavior change: stateless `ManifestFileIterator::create` `table_snapshot_id` placeholder, `ParquetV3BlockInputFormat` row-group key unambiguity via `path.size()`, partition-only candidate sharing between data and delete iterators, derived `StorageInMemoryMetadata` `TableStateSnapshot` equality safety under `SYSTEM CLEAR ICEBERG METADATA CACHE`, and `DatabaseDataLake::tryGetTableImpl` global-context credentials, TTL race, and `ALTER DATABASE` over-invalidation. Related: ClickHouse#116235 Related: ClickHouse#115873 Related: ClickHouse#115874 Related: ClickHouse#115876 Related: ClickHouse#115877 Related: ClickHouse#115878
Pin disjoint row-group dictionaries, disable other pruning paths, compare with an unfiltered baseline, and assert `read_rows = 10000` on the cache-hit read. Verified against the existing PR CI binary. Related: ClickHouse#115877 (comment)
…eriesPrometheusValueToString Fix width of `timeSeriesPrometheusValueToString` doc example table (breaks "Docs examples" check)
Includes the documentation example fix from ClickHouse#117827; the strengthened dictionary regression remains in the PR.
|
🕵 Strengthened the dictionary-pruning regression: three deterministic row groups, other filters disabled, exact results compared with an unfiltered baseline, and The previous |
|
Dear @scanhex12, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
Closing as superseded rather than rebasing. #124364 (merged 2026-10-20, in 26.11+) now has the metadata cache return a shared cache cell, and readers reference the cached footer through A rebase would now be a no-op or a duplicate of merged code, so I'm closing it instead of pushing a branch. The regression coverage requested in review is also largely covered by Thanks @scanhex12 for the earlier review and the pointer on |
Related: #116235
Avoid copying a cached Parquet footer into every V3 reader. Readers hold an aliasing
shared_ptrto immutable metadata, retaining its lifetime after cache eviction.The focused dictionary regression now uses three deterministic row groups, disables other filters, compares exact results with an unfiltered read, and requires
read_rows = 10000on a footer-cache hit. It passed against the PR'sfbaf0da3CI binary. The updated head also incorporates the documentation-example fix from #117827; upstream checks on that head are running.The earlier private sync check reported
build failed; its logs are not accessible with my account, so I have asked for the failing file/symbol rather than assuming it is unrelated. Historical measurements in the umbrella issue are not fresh isolated measurements of this head.Changelog category (leave one):
Changelog entry:
Share immutable cached Parquet footer metadata between V3 readers instead of copying it for each reader.
Original implementation assisted by DeepSeek V4 Pro; follow-up revisions also used AI assistance.
Workflow [PR]
Sync PR [sync-upstream/pr/115877]