Draft
Conversation
Writes Iceberg V2 equality delete files in parquet format, containing key column values that identify rows to delete. The schema and field IDs in the output file match the equality columns from the table schema.
Pulls manifest writing, bin-packing, and snapshot construction helpers out of merge_append_action into reusable utilities, preparing for row_delta_action which needs the same manifest infrastructure to commit both data and delete files.
Extends snapshot summary with delete file counts, equality/position delete row counts, and delete manifest counts per the Iceberg V2 spec.
Implements the Iceberg RowDelta operation that atomically commits data files and delete files in a single snapshot. Writes separate data and delete manifests, validates content types, and produces the snapshot update with delete-aware summary statistics.
Exposes row_delta on the transaction, mirroring merge_append, so callers can commit data files alongside delete files in a single transactional operation.
andrwng
commented
Apr 21, 2026
|
|
||
| namespace iceberg { | ||
|
|
||
| struct delete_file_result { |
| /// - overwrite: when both data and delete files are present | ||
| /// - delete_data: when only delete files are present | ||
| /// - append: when only data files are present | ||
| class row_delta_action : public action { |
Contributor
Author
There was a problem hiding this comment.
Ask for a thorough review here
andrwng
commented
Apr 21, 2026
| * https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md | ||
| */ | ||
|
|
||
| #include "iceberg/equality_delete_file.h" |
| iobuf file; | ||
| serde::parquet::writer w( | ||
| {.schema = std::move(opts.parquet_schema), .compress = opts.compress}, | ||
| make_iobuf_ref_output_stream(file)); |
Contributor
Author
There was a problem hiding this comment.
This is another test.
| log.error, | ||
| "Metadata for delete file {} is missing partition key", | ||
| f.file.file_path); | ||
| co_return action::errc::unexpected_state; |
andrwng
commented
Apr 21, 2026
Comment on lines
+447
to
+470
| redpanda_cc_library( | ||
| name = "manifest_utils", | ||
| srcs = [ | ||
| "manifest_utils.cc", | ||
| ], | ||
| hdrs = [ | ||
| "manifest_utils.h", | ||
| ], | ||
| implementation_deps = [ | ||
| ":compatibility", | ||
| ":logger", | ||
| ":manifest", | ||
| ":partition_key_type", | ||
| ":values_bytes", | ||
| ], | ||
| deps = [ | ||
| ":action", | ||
| ":manifest_entry", | ||
| ":manifest_io", | ||
| ":manifest_list", | ||
| ":schema", | ||
| ":table_metadata", | ||
| "//src/v/base", | ||
| ], |
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬