Skip to content

Flink: Resolve unpartitioned equality deletes across all partitions#17018

Open
mxm wants to merge 1 commit into
apache:mainfrom
mxm:resolve-equality-deletes.unpartitioned-deletes
Open

Flink: Resolve unpartitioned equality deletes across all partitions#17018
mxm wants to merge 1 commit into
apache:mainfrom
mxm:resolve-equality-deletes.unpartitioned-deletes

Conversation

@mxm

@mxm mxm commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The PK index keys rows by (spec id, equality values), so a delete only matches data written under the same spec. However, according to the Iceberg table spec, while a partitioned delete applies only within its own spec, an unpartitioned equality delete must apply across every spec.

This change drops the spec id from the key, so all rows with the same equality values co-locate on one shard. We scope at resolve time instead: RESOLVE_DELETE carries the delete's spec id, or a GLOBAL_DELETE_SPEC_ID when the delete is unpartitioned. The index deletes a row only when the delete is global or the row's spec id matches. DVPosition already carries each row's spec id, so no extra row state is needed.

The PK index keys rows by (spec id, equality values), so a delete only matches
data written under the same spec. However, according to the Iceberg table spec,
while a partitioned delete applies only within its own spec, an unpartitioned
equality delete must apply across every spec.

This change drops the spec id from the key, so all rows with the same equality
values co-locate on one shard. We scope at resolve time instead: RESOLVE_DELETE
carries the delete's spec id, or a GLOBAL_DELETE_SPEC_ID when the delete is
unpartitioned. The index deletes a row only when the delete is global or the
row's spec id matches. DVPosition already carries each row's spec id, so no
extra row state is needed.
@github-actions github-actions Bot added the flink label Jun 30, 2026
@mxm mxm changed the title Flink: Resolve unpartitioned equality deletes across all partitions Flink 2.1: Resolve unpartitioned equality deletes across all partitions Jun 30, 2026
@mxm mxm changed the title Flink 2.1: Resolve unpartitioned equality deletes across all partitions Flink: Resolve unpartitioned equality deletes across all partitions Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant