[
https://issues.apache.org/jira/browse/FLINK-41674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41674:
-----------------------------------
Labels: pull-request-available (was: )
> Let PTFs that skip retractions read upserts 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
>
> 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 skips retractions never matches an UPDATE_AFTER to a previous row.
> We should add an internal {{StaticArgumentTrait.SKIP_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)