VasShabu opened a new pull request, #29995:
URL: https://github.com/apache/flink/pull/29995
## What is the purpose of the change
Every PTF implicitly gets the optional system arguments `on_time` and `uid`.
A built-in PTF without event-time semantics could only drop `on_time` through
`disableSystemArguments(true)`, which also drops `uid`, or by adding its own
check. This adds a framework-level switch that rejects `on_time` and keeps
`uid`. It is needed by `DEDUPLICATE` (#29967) and by any other built-in PTF
without event time.
The switch is only available on `BuiltInFunctionDefinition`, so no public
API is added.
## Brief change log
- `BuiltInFunctionDefinition.Builder#disableOnTimeArgument(boolean)` and
`isOnTimeArgumentDisabled()`.
- `SystemTypeInference#of(FunctionDefinition, TypeInference)` reads the
switch from a built-in definition. `SystemInputStrategy` rejects a non-empty
`on_time` with a `ValidationException`. The switch has no effect if
`disableSystemArguments(true)` is set.
- `BridgingSqlFunction` (SQL) and `ResolveCallByArgumentsRule` (Table API)
pass the function definition instead of its kind.
No built-in function uses the switch yet.
## Verifying this change
This change added tests and can be verified as follows:
- `SystemTypeInferenceTest`: `on_time => DESCRIPTOR(ts)` is rejected when
the switch is on; `uid` and an empty `on_time` are accepted when it is on;
`on_time` is accepted when it is off.
## 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): 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? 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)
Generated-by: Claude Code (Claude Sonnet 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]