gustavodemorais opened a new pull request, #30173:
URL: https://github.com/apache/flink/pull/30173
## What is the purpose of the change
Follow-up to #30123 (only the last two commits are new). PTFs that declare
`IGNORE_RETRACTIONS` never read UPDATE_BEFORE or DELETE rows, but these rows
still reach them. This PR adds a generic `ChangelogFilter` node that keeps only
a given set of row kinds, and places it below such functions as low as
possible: below Calcs and Unions, on top of sources and stateful operators.
Since the planner now enforces the trait, it is exposed to user PTFs as
`ArgumentTrait.IGNORE_RETRACTIONS`.
## Brief change log
- New `ChangelogFilter` node (physical, exec `stream-exec-changelog-filter`,
runtime filter), reusable for other row-kind filtering.
- The planner places it below `IGNORE_RETRACTIONS` arguments, so keyless
Calcs no longer forward all-NULL tombstones and non-key filters over sources
with key-only deletes (e.g. upsert-kafka) no longer need a `ChangelogNormalize`.
- `ArgumentTrait.IGNORE_RETRACTIONS` for user PTFs (requires
`SUPPORT_UPDATES`, cannot be combined with `REQUIRE_UPDATE_BEFORE` /
`REQUIRE_FULL_DELETE`), documented in the PTF docs.
## Verifying this change
Plan tests in `ToAppendTest`, `ToChangelogTest` and
`ProcessTableFunctionTest`, semantic tests in `ToAppendSemanticTests` and
`ProcessTableFunctionSemanticTests` (a user PTF that fails on any retraction),
extraction tests in `TypeInferenceExtractorTest`, metadata tests, and a
compiled-plan round trip for the new exec node.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: yes, new `ArgumentTrait.IGNORE_RETRACTIONS`
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? docs (PTF docs) and JavaDocs
---
##### Was generative AI tooling used to co-author this PR?
- [x] Yes (please specify the tool below)
Generated-by: Claude Code 2.1.304 (Opus 5.5)
--
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]