Conversation
…next commit) --- Original cherry-pick message follows: Merge pull request #2183 from Altinity/feature/antalya-26.6/iceberg-puffin-deletion-vectors-read-2 Iceberg deletion vector support (attempt #2) # Conflicts: # docs/reference/engines/table-engines/integrations/iceberg.mdx # docs/reference/functions/table-functions/iceberg.mdx # docs/reference/functions/table-functions/icebergCluster.mdx # docs/reference/statements/system.mdx # src/Access/Common/AccessType.h # src/AggregateFunctions/AggregateFunctionGroupBitmapData.h # src/Common/ProfileEvents.cpp # src/Core/Settings.cpp # src/Formats/FormatFilterInfo.cpp # src/Interpreters/InterpreterSystemQuery.cpp # src/Parsers/ASTSystemQuery.h # src/Parsers/ParserSystemQuery.cpp # src/Processors/Formats/Impl/Parquet/Reader.cpp # src/Storages/ObjectStorage/DataLakes/Common/AvroForIcebergDeserializer.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergDataObjectInfo.h # src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergDeletionVector.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergIterator.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergIterator.h # src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFile.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFile.h # src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFileIterator.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/Mutations.cpp # src/Storages/ObjectStorage/DataLakes/Iceberg/Snapshot.h # src/Storages/ObjectStorage/DataLakes/Iceberg/tests/gtest_iceberg_count_shortcuts.cpp # src/Storages/ObjectStorage/DataLakes/PuffinDeletionVectorReader.cpp # src/Storages/ObjectStorage/DataLakes/PuffinDeletionVectorReader.h # src/Storages/ObjectStorage/DataLakes/tests/gtest_puffin_dv_referenced_data_file.cpp # src/Storages/ObjectStorage/DataLakes/tests/gtest_puffin_files_cache_metrics.cpp # src/Storages/ObjectStorage/DataLakes/tests/gtest_puffin_footer_cache.cpp # src/Storages/ObjectStorage/IObjectIterator.h # src/Storages/ObjectStorage/StorageObjectStorageSource.cpp # src/Storages/ObjectStorage/tests/gtest_rendezvous_hashing.cpp # tests/integration/test_storage_iceberg_with_spark/test_deletion_vectors.py # tests/queries/0_stateless/01271_show_privileges.reference # tests/queries/0_stateless/04117_parser_system_query_variants.reference # tests/queries/0_stateless/04117_parser_system_query_variants.sql
PR #2183 (Iceberg deletion vector support) is already present on this branch: it was ported earlier in the pipeline (commits "Cherry-pick of .../pull/2183 ..." + "Resolve conflicts in cherry-pick of #2183") and then extended by the port of #2271 (Delta-style `.bin` deletion-vector containers, footer memo, DV classification by content offsets). Every conflict hunk therefore had "ours" holding the same change in its newer, superset form, so all hunks are resolved to "ours": - docs (iceberg.mdx, icebergCluster.mdx, system.mdx): ours documents the Puffin *and* Delta `.bin` containers and keeps the neighbouring Paimon / point-in-polygon cache sections. - AccessType.h, ASTSystemQuery.h, ParserSystemQuery.cpp, InterpreterSystemQuery.cpp, 01271_show_privileges.reference, 04117_parser_system_query_variants.{sql,reference}: SYSTEM DROP PUFFIN FILES CACHE already exists; the conflicts only concerned the neighbouring POINT IN POLYGON cache entries, which are kept. - ProfileEvents.cpp / Settings.cpp: append-only registries - only the rows already on the branch are kept (Puffin rows are already there). - Iceberg sources (AvroForIcebergDeserializer, IcebergDeletionVector, IcebergIterator, IcebergMetadata, ManifestFile*, Mutations, Snapshot, PuffinDeletionVectorReader, StorageObjectStorageSource, IObjectIterator, gtests): ours is the superset (content-offset based DV detection, path_resolver instead of the removed resolveObjectStorageForPath / requires_external_storage, deferred ensureDeletesReady, Delta `.bin` container detection, footer memo, lazy materialization). Three artifacts the replay left outside the markers are undone because "ours" already carries the same content: - ASTSystemQuery.cpp: removed the duplicated `case Type::CLEAR_PUFFIN_FILES_CACHE:` label (would not compile). - AvroForIcebergDeserializer.cpp: removed the duplicated `#include <Poco/String.h>`. - ManifestFile.h: removed the `#include <Poco/String.h>` that was only needed by the older `Poco::toLower(file_format) == "puffin"` form of `isDeletionVector()`, which ours replaced. - SettingsChangesHistory.cpp: removed the stray blank line; the `use_puffin_files_cache` row is already present exactly once. Net effect: the tree is identical to the pre-cherry-pick state, i.e. the feature stays in the form already ported to antalya-26.8.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Iceberg deletion vectors support (#2183 by @ianton-ru).
CI/CD Options
Exclude tests:
Regression jobs to run:
Cherry-picked from #2183.
Documentation entry for user-facing changes
Goal
Add read support for Iceberg v3 Puffin deletion vectors (
deletion-vector-v1) so ClickHouse applies DV bitmaps when reading Iceberg tables (local / object storage / cluster), without writing DVs.Also expose SQL input formats
Puffin/PuffinMetadatafor inspecting Puffin files, and a process-global Puffin files cache for parsed DV bitmaps.High-level architecture
Shared Puffin parsing / DV deserialize lives under:
PuffinFilePuffinDeletionVectorReaderPuffinFilesCacheIcebergDeletionVectorrecord_countPuffinBlockInputFormatPuffin/PuffinMetadatainput_format_allow_seeks = 0).Feature behavior (what users get)
content = 2/ deletion vectors).data − deletesarithmetic.excluded_rowsor delete metadata (no silent drop of deletes).SYSTEM DROP PUFFIN FILES CACHE(spaced form; underscore alias accepted) clears the cache; gated by access control.use_puffin_files_cacheand related server/cache size settings (seeSettings/ docs).Safety / fail-closed decisions (intentional)
Reviewers should treat these as product decisions, not accidental omissions:
(content_offset, content_size)matchingreferenced_data_file+ cardinality.< data_file.record_count.isEtagUsableAsCacheKey).excluded_rowsis present.Explicitly out of scope / deferred (workspace rule): Poco JSON
Int64wrap of2^63/2^63+1— do not treat as a defect to fix in this PR.Tests (where to look)
Unit / gtest
CacheBase/ LRU:getOrSetWithOutcome*Stateless
allow_seeks=0, stdin pipe, error fixtures undertests/queries/0_stateless/data_puffin/SYSTEM DROP PUFFIN FILES CACHEparsing / privilegesIntegration
tests/integration/test_storage_iceberg_with_spark/test_deletion_vectors.pydata_minio/(dv_puffin_*), generatorgenerate_iceberg_dv_fixture.pyDocs touched
Puffin/PuffinMetadataformatsSYSTEM DROP PUFFIN FILES CACHE