Skip to content

[FLINK-41531][table]Let a built-in PTF disable the on_time system argument while keeping uid - #29995

Open
VasShabu wants to merge 2 commits into
apache:masterfrom
VasShabu:disableOnTimeArgument
Open

VasShabu wants to merge 2 commits into
apache:masterfrom
VasShabu:disableOnTimeArgument

Conversation

@VasShabu

Copy link
Copy Markdown
Contributor

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?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Claude Sonnet 5.5)

@VasShabu VasShabu changed the title [FLINK-41531][table]Disable on time argument [FLINK-41531][table]Let a built-in PTF disable the on_time system argument while keeping uid Nov 17, 2026
@VasShabu
VasShabu force-pushed the disableOnTimeArgument branch from b7f6c10 to 64e1f07 Compare November 17, 2026 17:22
@flinkbot

flinkbot commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants