[Core] Support read increment changelog and delta between two tag. #6324
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
In our company, we have a business requirement to compute the primary keys of new (+I) and deleted (-D) records between today's and yesterday's partitions of an ODPS (Alibaba Cloud MaxCompute) table using Paimon.
We have conducted a POC that a daily Flink batch job reads a partition from the ODPS table and writes it to a Paimon primary key table. This job is configured with the following parameters:
'full-compaction.delta-commits'='1', 'changelog-producer'='full-compaction', 'tag.automatic-creation' = 'batch', 'tag.batch.customized-name'='ds=20250922'
This gives us two snapshots and one tag daily.
We found that we can read the changelog by providing snapshot IDs, like in the SQL below, but we can't do the same using tags.
SELECT rowkind, item_id, sku_id, ds FROM
alake.
omega_alake.
kk_invalid_sku_prediction_v4$audit_log/*+ OPTIONS('scan.parallelism'='128', 'incremental-between-scan-mode'='changelog', 'incremental-between'='2,4')*/ where rowkind = '+U' OR rowkind = '-U' limit 100;
So, this PR adds support for reading the incremental changelog and delta between two specified tags.
Linked issue: close #xxx
Tests
API and Format
Documentation