[ 
https://issues.apache.org/jira/browse/FLINK-41516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146322#comment-18146322
 ] 

Gustavo de Morais commented on FLINK-41516:
-------------------------------------------

Fixed in apache/flink:master 4721ddb03fbfe183a56fe525af91c8ee6d4095ab

> Row-semantic PTFs keep an unnecessary ChangelogNormalize for upsert sources 
> with full deletes
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLINK-41516
>                 URL: https://issues.apache.org/jira/browse/FLINK-41516
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Gustavo de Morais
>            Assignee: Gustavo de Morais
>            Priority: Major
>              Labels: pull-request-available
>
> Since FLINK-41371, row-semantic PTFs with insert-only output consume upsert 
> inputs directly. For an upsert source with full deletes, the planner still 
> keeps a {{ChangelogNormalize}} below the PTF, even though it emits the same 
> changelog it receives.
> The delete-kind inference for PTF table arguments first requests key-only 
> deletes. The {{ChangelogNormalize}} answers with full deletes, which does not 
> satisfy the request, but the result is accepted without a check, so the 
> fallback to full deletes - which would remove the normalize - never runs. 
> {{visitChildren}} performs this check; the PTF branch calls {{visit}} 
> directly. Joins use the same pattern but are not affected, because an 
> {{Exchange}} always sits between them and the normalize.
> We should only accept the key-only result if it satisfies the requested 
> trait, as {{visitChildren}} does.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to