Skip to content

[FLINK-39899] Fix Flink SQL rowtime attributes after Window TVF#28376

Open
shanzi wants to merge 3 commits into
apache:masterfrom
shanzi:FLINK-39899
Open

[FLINK-39899] Fix Flink SQL rowtime attributes after Window TVF#28376
shanzi wants to merge 3 commits into
apache:masterfrom
shanzi:FLINK-39899

Conversation

@shanzi

@shanzi shanzi commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

This MR is to fix FLINK-39899 which allows original rowtime keep to be rowtime attribute after Window TVF, where a new window_time is added as the correct rowtime attribute. This not only mismatches the original design in FLIP-145. ("The original row time attribute "timecol" will be a regular timestamp column after applying window TVF."), but also can lead to dropped results and incorrect result when misused.

This change is to fix the issue: after Window TVF, only one rowtime attribute will be left.

Brief change log

  • Updated SqlWindowTableFunction to fix the rowtime attribute
  • Updated a logical and physical WindowTableFunctionTransposeRule to align the behavior
  • Updated unit tests and planner xml to fix tests

Verifying this change

Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.

This change added tests and can be verified as follows:

  • Planner output xml has been updated to verify the original rowtime is no loger rowtime attribute after Window TVF
  • WindowTableFunctionTest is updated to verify the behavior.

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

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code

@shanzi shanzi changed the title [FLINK-39899] Flink rowtime attribute after Window TVF [FLINK-39899] Fix Flink rowtime attributes after Window TVF Jun 10, 2026
@shanzi shanzi changed the title [FLINK-39899] Fix Flink rowtime attributes after Window TVF [FLINK-39899] Fix Flink SQL rowtime attributes after Window TVF Jun 10, 2026
@flinkbot

flinkbot commented Jun 10, 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

@shanzi shanzi marked this pull request as draft June 11, 2026 11:21
@shanzi shanzi marked this pull request as ready for review June 12, 2026 02:02
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