Repository navigation
Conversation
|
@alexey-milovidov Can you help me check this feature when you have time |
asya-ch
left a comment
There was a problem hiding this comment.
Hey, thank you for your contribution! Please address my feedback, and I'll take another pass at reviewing afterwards.
|
Workflow [PR], commit [f5463ff] Summary: ❌
AI ReviewSummaryThis PR adds Iceberg v3 deletion-vector reads by parsing the new manifest fields, carrying the deletion-vector location through cluster read-task serialization, and applying Puffin-backed deletes in the Iceberg read path. The main flow is coherent and the new integration coverage is useful, but the current head still has one new correctness gap, one missing protocol-spec update, and a few previously discussed contract issues that are still present in the code. Missing context / blind spots
Findings
Tests
Performance & Safety
Final VerdictStatus:
LLVM Coverage ReportMeasured on commit f5463ff.
Changed lines: Changed C/C++ lines covered: 284/316 (89.87%) · Uncovered code |
|
@asya-ch |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes24 object files changed (+101.81 KiB total), 1 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units313 translation units recompiled, 2883 s compile time in total, 312 of them have a recent master baseline. Median compile-time ratio to the baselines is ×0.88 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. Translation units without a recent master baseline:
|
asya-ch
left a comment
There was a problem hiding this comment.
Thank you for updating the code! I think the overall logic here is good, it just needs some cleanup (see other comments). It will be great to have deletion vector support.
|
@asya-ch Thanks for reviewing, all the comment have been fixed. Please review it for me again. |
asya-ch
left a comment
There was a problem hiding this comment.
Found a few more perf fixes. Almost there!
|
@asya-ch the perf fixes has been modified , Do we need to revise the questions the robot asked? Thanks, please help me review it |
Yes, we'll need to revise the optimization logic and add a test, but please hold off before spending more time on it. There's a competing PR (#113561) that also implements deletion vector support. I've started to review it, but it is quite long. I want to take some time to better understand the design there before merging either PR. The advantage of that PR is that it has caching, optimizations around count(), and extensive tests. I'll try to get through it this week and decide how to proceed. We might merge just one PR or combine ideas from the two. Thanks for your patience. |
|
@linjiayu1025-collab, I would like to proceed with this PR. Could you please add the optimization logic and a test for it? I think the other PR can be broken up into smaller PRs that are merged after this one. |
|
|
||
| void IcebergDataObjectInfo::addPositionDeleteObject(Iceberg::ProcessedManifestFileEntryPtr position_delete_object, const String & resolved_storage_path) | ||
| { | ||
| const bool is_deletion_vector = Poco::toUpper(position_delete_object->parsed_entry->file_format) == "PUFFIN"; |
There was a problem hiding this comment.
seems strange as addPositionDeleteObject doesn't match with deletion vectors, so this place should be refactored somehow
| if (info.deletion_vector.has_value()) | ||
| throw Exception(ErrorCodes::ICEBERG_SPECIFICATION_VIOLATION, "Multiple deletion vectors apply to the same Iceberg data file"); | ||
|
|
||
| info.position_deletes_objects.clear(); |
There was a problem hiding this comment.
why do we need it? let's check that it's not empty and throw an exception
There was a problem hiding this comment.
You are allowed to have a mix of position delete files and deletion vectors (say, if a table was upgraded from V2 to V3).
The spec says that if there is a deletion vector on a certain data file, reads must disregard the position files.
I'll add a comment to make it more clear.
| } | ||
|
|
||
| void IcebergStreamingPositionDeleteTransform::fetchNewChunkFromSource(size_t delete_source_index) | ||
| IcebergStreamingPositionDeleteTransform::DeletionVectorState::DeletionVectorState(std::unique_ptr<roaring::Roaring64Map> bitmap_) |
There was a problem hiding this comment.
Why do we have streaming position delete transform and bitmap?
Streaming here means that we don't read the whole delete file at once. We read it chunk by chunk (as iceberg spec gives us a guarantee that this file is sorted). When we have deletion vector we apply the whole part at once, so it seems more like non-streaming way as we don't need to rely on the rule of sorting
I think you need to move this bitmap into non-streaming transform
There was a problem hiding this comment.
Good point, we can disregard the setting for deletion vectors.
e601945
|
@linjiayu1025-collab @asya-ch — title/description suggestions: Description (currently
Ignore if intentional. |
`test_optimize_rejected_on_format_v3` created a positional delete so that compaction would have work to do, then asserted that OPTIMIZE is refused on a format-version 3 table. Since 2288bde (ClickHouse#110781, "Add support for reading Iceberg v3 deletion vectors") `Iceberg::mutate` refuses DELETE and UPDATE outright on format-version 3, so that setup step throws NOT_IMPLEMENTED and the test now aborts before reaching its own assertion. It was red on all six integration flavours that ran it at 5abe53e. The delete file was never needed for the refusal: the format-version check sits at the top of `getPlan`, ahead of the manifest scan that computes `need_optimize`, so a v3 table is rejected whether or not it carries delete files. Dropping the DELETE therefore keeps the arm's subject intact and leaves it able to fail: with the guard deleted from `Compaction.cpp` the OPTIMIZE succeeds and the assertion reddens (verified against a mutant build). Co-Authored-By: Claude Opus 5 <[email protected]>
Resolves: #107502
Changelog category (leave one):
Changelog entry:
Add read support for Iceberg v3 deletion vectors stored in Puffin files.
Summary:
This PR adds read support for Iceberg v3 deletion vectors stored in Puffin files.
Supported:
referenced_data_filecontent_offsetcontent_size_in_bytesNot supported:
Notes:
Documentation entry for user-facing changes
Workflow [PR]
Sync PR [sync-upstream/pr/110781]
Version info
26.10.1.35(included in26.10and later)