[
https://issues.apache.org/jira/browse/FLINK-39575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-39575:
-----------------------------------
Labels: pull-request-available (was: )
> Fix output rowtype in StreamPhysicalProcessTableFunction.toUdfCall when table
> arg is not first
> ----------------------------------------------------------------------------------------------
>
> Key: FLINK-39575
> URL: https://issues.apache.org/jira/browse/FLINK-39575
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 2.4.0
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> Labels: pull-request-available
>
> StreamPhysicalProcessTableFunction.toUdfCall always reads staticArgs.get(0)
> when deciding whether a table operand has the PASS_COLUMNS_THROUGH trait. The
> lookup should be per-operand: staticArgs.get(operand.i). This is a leftover
> from the first released versions.
>
> When the first declared argument is not the table being inspected (e.g.
> f(Integer i, Row r WITH PASS_COLUMNS_THROUGH)), the trait check uses the
> wrong static argument. This produces an incorrect prefixOutputSystemFields
> count and the UDF
> call's rowtype is not stripped of the system-prefixed columns. The wrong
> rowtype is then passed to ProcessTableRunnerGenerator, leading to incorrect
> code generation for the PTF runner.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)