Repository navigation
Conversation
|
Looks like AI one-shot. You also filed many PRs simultaneously. Consider creating an issue instead |
|
@rienath thanks for the feedback. I've moved the full context into #116235 (measurements, repro, landing order). This PR is the ordered row-group fence search, last in that order and the largest of the six. One thing to note: it only activates when footer statistics prove the ranges are strictly ordered and non-overlapping, and it still runs the full condition on the candidate as a residual check. I'll rebase all six onto master and update here once fork validation is green. |
Keep the row-group fence search current with master.
The stateless test was committed with mode 100644, so clickhouse-test fails to run it with Permission denied.
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
…into files cache Replace the hand-rolled `OrderedRowGroupIndexCache` (`mutex` + `unordered_map` + `list`) with `CacheBase` in the new `ParquetOrderedRowGroupIndexCache.h`: bounded eviction, `ParquetOrderedRowGroupIndexCacheBytes/Files` gauges and `ParquetOrderedRowGroupIndexCacheWeightLost` events. `SYSTEM CLEAR PARQUET METADATA CACHE` now resets the fence index too (same file-identity keying), covered by a clear-and-miss round-trip in `05024_parquet_sorted_row_group_point_lookup`. Move the single-entry derived `StorageInMemoryMetadata` cache out of `IcebergMetadata` into `IcebergMetadataFilesCache` as `DerivedStorageMetadata`, keyed by the exact `TableStateSnapshot::operator==` fields. This bounds its memory, shares entries across storages of one table, and couples its lifetime to `SYSTEM CLEAR ICEBERG METADATA CACHE`. Time-travel queries still bypass it, and with `use_iceberg_metadata_files_cache=0` the metadata is built directly with no caching. Related: ClickHouse#116235 Related: ClickHouse#115874 Related: ClickHouse#115878
Replace the hand-rolled `OrderedRowGroupIndexCache` (`mutex` + `unordered_map` + `list`) with `CacheBase` in the new `ParquetOrderedRowGroupIndexCache.h`: bounded eviction, `ParquetOrderedRowGroupIndexCacheBytes/Files` gauges and `ParquetOrderedRowGroupIndexCacheWeightLost` events. `SYSTEM CLEAR PARQUET METADATA CACHE` now resets the fence index too (same file-identity keying), covered by a clear-and-miss round-trip in `05024_parquet_sorted_row_group_point_lookup`. Related: ClickHouse#115878
The `CacheBase` port dropped the anonymous namespace but kept its closing brace, ending `DB::Parquet` early and breaking unqualified lookup for the rest of `Reader.cpp`. Related: ClickHouse#115878
The `CacheBase` port dropped the anonymous namespace but kept its closing brace, ending `DB::Parquet` early and breaking unqualified lookup for the rest of `Reader.cpp`. Related: ClickHouse#115878
Add cold/warm differential fixtures for ascending, descending, overlapping, nullable, decimal, timestamp and NaN-containing row groups. Isolate the existing counter test filenames and query IDs across retries. The new fixture passed on the baseline binary; the fence-enabled build and counter tests remain pending.
|
Closing this draft to keep the review queue clear, per @rienath's request in #116235 to not have the whole series open at once. The fence-index idea and its ordering/precondition caveats stay in #116235. Nothing here is being pursued right now; happy to reopen as a fresh, focused PR if the team wants this piece. |
Related: #116235
For conjunctive point lookups, use a cached fence index only after footer statistics establish strictly ordered, non-overlapping row-group ranges. The selected candidate still passes through ordinary residual filtering; unsupported files use ordinary pruning.
Added cold/warm result comparisons against filtering without pushdown for ascending, descending, overlapping, nullable, decimal, timestamp and NaN-containing fixtures. The fixtures pass on a baseline binary. The fence-enabled build, counter regression, and differential tests are queued: https://github.com/adonm/ClickHouse/actions/runs/33951075622. Counter-test filenames and query IDs are isolated across retries.
Kept draft behind the shared-footer change. Cache configuration/memory accounting and broader boundary coverage remain to be reviewed; combined-branch timing results are not isolated evidence for this head.
Changelog category (leave one):
Changelog entry:
Use validated ordered Parquet row-group fences to narrow supported point lookups before applying ordinary row-group filtering.
Original implementation assisted by DeepSeek V4 Pro; follow-up revisions also used AI assistance.