Skip to content

[FLINK-40304][table] Fix PTF partition columns for multiple table arguments - #28884

Open
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/40304
Open

[FLINK-40304][table] Fix PTF partition columns for multiple table arguments#28884
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/40304

Conversation

@Au-Miner

@Au-Miner Au-Miner commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

This change fixes incorrect partition-column positions inferred for a PTF with multiple table arguments. The bug can omit an upsert key from a later table argument and prevent a valid query from being planned for an upsert sink.

Brief change log

  • Correct StreamPhysicalProcessTableFunction#toPartitionColumns to account for the cumulative output offset when deriving partition columns.
  • Add a regression plan test whose sink primary key corresponds to the partition column of the second table argument.

Verifying this change

Added ProcessTableFunctionTest#testUpsertKeyWithMultipleTableArgs to verify that the partition column of the second table argument remains a valid upsert key. The targeted regression test and the complete ProcessTableFunctionTest suite with 69 tests passed.

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

@flinkbot

flinkbot commented Aug 3, 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

Au_Miner and others added 2 commits August 4, 2026 15:02
…uments

AI-Contributed/Feature: 0/2
AI-Contributed/UT: 0/48
AI-Contributed/Feature: 0/0
AI-Contributed/UT: 0/6
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