csurong opened a new pull request, #10968:
URL: https://github.com/apache/paimon/pull/10968
### Purpose
Fixes #10967.
Flink `expire_changelogs` builds its retention configuration from explicit
arguments only. When arguments are omitted, it uses internal builder defaults
instead of the table's retention options. For example, a table configured with
changelog min=4/max=8 retains all six separated changelogs when called with
only the table name, while passing the same values explicitly deletes two.
Reuse `ProcedureUtils.fillInChangelogOptions` so explicit arguments take
precedence and omitted arguments inherit table options. This applies to both
the SQL procedure and the Action that delegates to it. Keep rejecting
explicitly blank `older_than` values before cleanup, since the shared helper
otherwise treats them as omitted.
Add real-table regression coverage and document the compatibility change:
existing calls can now expire logs according to the table policy, and partial
overrides can conflict with an inherited minimum. Stored table options, the
deletion algorithm and consumer protection are unchanged. The Flink
1.18-specific legacy overloads and Spark implementation are not modified.
### Tests
Verified on JDK 11 and Flink 1.20.1 against base commit `24708924fc`. With
the original procedure and the same regression tests, all three count/time
retention cases fail on the expected assertions (no runtime errors). With this
change, the complete `ExpireChangelogsProcedureITCase` passes: **9 tests, 0
failures, 0 errors, 0 skipped**.
Coverage includes Action/SQL table retention, partial overrides, conflicting
bounds, time retention, rejection of blank timestamps without deleting logs,
and the existing Action execution modes and cleanup cases.
```bash
mvn -B -ntp -pl paimon-flink/paimon-flink-common -am -Pflink1 \
-DfailIfNoTests=false -DwildcardSuites=none \
-Dtest=ExpireChangelogsProcedureITCase test
```
The build ran without `fast-build`; Checkstyle, Spotless and Enforcer
passed. `git diff --check` also passed. The full repository test suite was not
run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]