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

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

Fixed in apache/flink:master b6b1ea71558aee22d1aba3c3c9227a2163672749

> 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
>
> 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)

Reply via email to