Gustavo de Morais created FLINK-41676:
-----------------------------------------

             Summary: Remove ChangelogNormalize for filters below PTFs that 
skip retractions
                 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


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