[
https://issues.apache.org/jira/browse/FLINK-41676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gustavo de Morais resolved FLINK-41676.
---------------------------------------
Fix Version/s: 2.5.0
Resolution: Fixed
> Remove ChangelogNormalize below PTFs that ignore retractions: non-key filters
> -----------------------------------------------------------------------------
>
> Key: FLINK-41676
> URL: https://issues.apache.org/jira/browse/FLINK-41676
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> 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].
> A filter on non-key columns of an upsert source is pushed into
> {{ChangelogNormalize}}, which is then always kept. The filter only affects
> the retractions that {{ChangelogNormalize}} produces.
> {code:sql}
> CREATE VIEW paid_orders AS SELECT * FROM orders WHERE status = 'PAID';
> SELECT * FROM TO_APPEND(input => TABLE paid_orders);
> {code}
> If the consumer ignores retractions, we should remove the
> {{ChangelogNormalize}} and keep its filter as a regular Calc. Sources with
> key-only deletes keep the {{ChangelogNormalize}}, since the filter cannot be
> evaluated on a tombstone.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)