gustavodemorais opened a new pull request, #28065:
URL: https://github.com/apache/flink/pull/28065

   ## What is the purpose of the change
   
     Adds a new public PTF argument trait `ArgumentTrait.NO_PASS_THROUGH` that 
lets a function fully own its output schema. By default the framework prepends 
the `PARTITION BY` columns and appends a `rowtime` suffix when `on_time` is
     provided; with this trait, neither is added. Useful when a PTF emits its 
input verbatim or otherwise produces a schema that should not be augmented by 
the framework.
   
     ## Brief change log
   
     - Add public `ArgumentTrait.NO_PASS_THROUGH` and internal 
`StaticArgumentTrait.NO_PASS_THROUGH`.
     - Introduce `PassThroughMode` enum (`KEY`, `ALL`, `NONE`) derived per 
table arg from the declared traits.
     - Unify the runtime pass-through collectors (`PassAllCollector`, 
`PassPartitionKeysCollector`) into a single `PassThroughCollector` that 
dispatches per-arg by mode.
     - Reject mutually exclusive traits at construction time in 
`StaticArgument.checkTraits` via `StaticArgumentTrait.getIncompatibleWith()`.
     - Document the trait and warn about consequences when the PTF does not 
forward partition keys or watermarked timestamps itself.
   
     ## Verifying this change
   
     - Unit tests in `StaticArgumentTest` and `StaticArgumentTraitTest` cover 
trait-to-mode derivation, conditional-trait resolution, mutual-exclusion 
validation, and symmetry of incompatibility.
     - Plan test 
`ProcessTableFunctionTest#testNoPassThroughFunctionOwnsOutputSchema` exercises 
the end-to-end planner path and verifies the output rowtype omits the partition 
key.
     - All pre-existing PTF restore tests in `ProcessTableFunctionRestoreTests` 
continue to pass against both the new code and the pre-existing JSON plans + 
savepoints.
   
     ## 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)`: (yes - new `ArgumentTrait.NO_PASS_THROUGH` constant)
     - 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? (yes)
     - If yes, how is the feature documented? (JavaDocs on 
`ArgumentTrait.NO_PASS_THROUGH` and updates to 
`docs/content/docs/dev/table/functions/ptfs.md` and the Chinese translation)
   
     ---
   
     ##### Was generative AI tooling used to co-author this PR?
   
     - [x] Yes (please specify the tool below)
   
     2.1.117 (Claude Code)
   


-- 
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]

Reply via email to