Skip to content

awong/iceberg v2/equality deletes#30204

Draft
andrwng wants to merge 5 commits intodevfrom
awong/iceberg-v2/equality-deletes
Draft

awong/iceberg v2/equality deletes#30204
andrwng wants to merge 5 commits intodevfrom
awong/iceberg-v2/equality-deletes

Conversation

@andrwng
Copy link
Copy Markdown
Contributor

@andrwng andrwng commented Apr 16, 2026

Stack created with GitHub Stacks CLIGive Feedback 💬

andrwng added 5 commits April 16, 2026 12:48
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.

namespace iceberg {

struct delete_file_result {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spill to disk?

/// - 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 {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask for a thorough review here

Copy link
Copy Markdown
Contributor Author

@andrwng andrwng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

* https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md
*/

#include "iceberg/equality_delete_file.h"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a test

iobuf file;
serde::parquet::writer w(
{.schema = std::move(opts.parquet_schema), .compress = opts.compress},
make_iobuf_ref_output_stream(file));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another test.

log.error,
"Metadata for delete file {} is missing partition key",
f.file.file_path);
co_return action::errc::unexpected_state;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more test

Comment thread src/v/iceberg/BUILD
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",
],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

range test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant