raminqaf opened a new pull request, #27973: URL: https://github.com/apache/flink/pull/27973
## What is the purpose of the change
`FROM_CHANGELOG` silently drops input rows when the operation code column
contains a value not present in the `op_mapping` (or not matching the default
mapping). This makes data loss invisible and very hard to debug — users have
no indication that rows are being discarded.
This PR changes the default behavior to throw a `RuntimeException` when an
unmapped operation code is encountered, making data issues visible immediately
rather than causing silent data loss.
## Brief change log
- Changed `FromChangelogFunction` to throw a `RuntimeException` instead of
silently returning when an unmapped op code is encountered
- Removed the `UNMAPPED_CODES_DROPPED` semantic test that asserted
silent-drop behavior
- Removed a duplicate input type strategy test ("Valid with UPDATE_BEFORE"
was identical to "Valid with custom mapping")
- Added `ChangelogFunctionITCase` with a runtime test that verifies the
exception is thrown for unmapped op codes
## Verifying this change
This change added tests and can be verified as follows:
- Added `ChangelogFunctionITCase.testFromChangelogFailsOnUnmappedOpCode` —
sets up a source with an `"UNKNOWN"` op code and asserts that `FROM_CHANGELOG`
throws a `RuntimeException` containing the invalid op code and the defined
op codes
## 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)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): yes (adds a
branch in the per-record `eval` path, but only on the error case which was
previously a silent return)
- 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? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Claude Code (Claude Opus 4.7)
--
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]
