[
https://issues.apache.org/jira/browse/FLINK-41674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gustavo de Morais resolved FLINK-41674.
---------------------------------------
Fix Version/s: 2.5.0
Resolution: Fixed
> Remove ChangelogNormalize below PTFs that ignore retractions: inputs without
> an upsert key
> ------------------------------------------------------------------------------------------
>
> Key: FLINK-41674
> URL: https://issues.apache.org/jira/browse/FLINK-41674
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> Part of removing unnecessary {{ChangelogNormalize}} below built-in PTFs that
> ignore retractions (e.g. {{TO_APPEND}}), see
> [apache/flink#30123|https://github.com/apache/flink/pull/30123].
> Insert-only PTFs read upserts only if their input has an upsert key. Without
> one, for example after a projection that drops the key or a {{UNION ALL}} of
> upsert tables, the planner falls back to retract mode and keeps a
> {{ChangelogNormalize}} to produce UPDATE_BEFORE.
> {code:sql}
> CREATE VIEW order_status AS SELECT status, amount FROM orders;
> SELECT * FROM TO_APPEND(input => TABLE order_status);
> {code}
> A PTF that ignores retractions never matches an UPDATE_AFTER to a previous
> row. We should add an internal {{StaticArgumentTrait.IGNORE_RETRACTIONS}},
> declare it for {{TO_APPEND}}, and let such PTFs read upserts without an
> upsert key.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)