[flink] Add data evolution delete action#8716
Open
wwj6591812 wants to merge 1 commit into
Open
Conversation
wwj6591812
marked this pull request as ready for review
July 18, 2026 13:25
wwj6591812
force-pushed
the
agent/data-evolution-delete-action
branch
from
July 19, 2026 08:20
dfd5371 to
3188506
Compare
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.
Purpose
Related to #8322.
This PR adds a bounded Flink Action named data_evolution_delete for logically deleting rows from non-primary-key Data Evolution append tables by writing deletion vectors.
The existing Flink delete Action emits DELETE changelog records and does not provide a deletion-vector path for non-primary-key Data Evolution append tables. Rewriting data files for random deletion is particularly expensive for Data Evolution tables with dedicated BLOB files. This Action provides a bounded cleanup path for retention policies, invalid data cleanup, and cache eviction.
What the Action does
Using an external subquery avoids copying a large Hologres/JDBC candidate set into an intermediate Paimon table.
Example
The external source must be bounded.
Ownership and operational constraints
An existing physical DV index file is the atomic rewrite group because it may contain deletion vectors for several anchor files. Splitting one old index file across writers could produce competing replacements, so it always has a single owner. Independent old index files and new-anchor shards can be written in parallel.
This Action performs a logical delete. Physical data and BLOB reclamation still requires Data Evolution compaction with data-evolution.compaction.rewrite-row-ids=true, followed by snapshot expiration.
Run at most one mutation job against the same target table at a time. The fixed base snapshot must remain retained until the Action finishes. Split very large deletes into bounded batches to limit row-tracking planning, deletion-vector memory, and external-source scan size.
This PR intentionally adds the Action only; a Flink Procedure can be added separately.
Tests
mvn -pl paimon-core,paimon-flink/paimon-flink-common -Pflink1 -DskipTests spotless:check mvn -pl paimon-flink/paimon-flink-common -am -Pflink1 -Dtest=DataEvolutionDeleteActionITCase,ProcedureTest -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.check.skip=true testThe targeted run passes 12 tests with 0 failures, errors, or skips:
Spotless, Checkstyle, and git diff --check also pass. The full suite will be exercised by CI.