Gustavo de Morais created FLINK-41371:
-----------------------------------------

             Summary: Row-semantic PTFs force retract mode on upsert inputs
                 Key: FLINK-41371
                 URL: https://issues.apache.org/jira/browse/FLINK-41371
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
    Affects Versions: 2.3.0, 2.4.0
            Reporter: Gustavo de Morais
            Assignee: Gustavo de Morais


PTFs with row semantics always receive retractions for upsert inputs, because 
{{FlinkChangelogModeInferenceProgram}} requires UPDATE_BEFORE whenever there is 
no PARTITION BY. This adds an unnecessary {{ChangelogNormalize}} and hash 
exchange, e.g. for {{TO_CHANGELOG}} with an {{op_mapping}} without 
UPDATE_BEFORE.

We should keep upsert mode when the input has an upsert key and the PTF is 
insert-only or passes all columns through, so the PTF can be chained to its 
input.



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

Reply via email to