Nico Kruber created FLINK-22404: ----------------------------------- Summary: Document inconsistencies around +I and +U generation in retract streams Key: FLINK-22404 URL: https://issues.apache.org/jira/browse/FLINK-22404 Project: Flink Issue Type: Bug Components: Documentation, Table SQL / API Affects Versions: 1.12.2 Reporter: Nico Kruber
Filters can remove +I messages and let a new row start with +U; similarly, they can remove the +U after -U which should instead have been reported as -D. This makes the semantics described on [https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/streaming/dynamic_tables.html#table-to-stream-conversion] wrong which makes users believe they can rely on +U vs. +I and -U vs. -D. Either this needs to be fixed, or a disclaimer should be added to the respective paragraphs that +U/+I and -U/-D should be seem as the same. Example: {code:sql} CREATE TEMPORARY VIEW test_cardinality AS SELECT * FROM ( VALUES ('Alice', 'al...@test.com', ARRAY [ 'al...@test.com' ], 'Test Ltd'), ('Alice', 'al...@test.com', ARRAY [ 'al...@test.com' ], 'Test Ltd'), ('Alice', 'al...@test2.com', ARRAY [ 'al...@test.com', 'al...@test2.com' ], 'Test Ltd')) AS t ( name, email, aliases, company ); {code} {code:sql} SELECT name, LEAD(CAST(company AS VARCHAR), 0) AS company FROM test_cardinality WHERE CARDINALITY(aliases) >= 2 GROUP BY name; {code} vs. {code:sql} SELECT name, LEAD(CAST(company AS VARCHAR), 0) AS company FROM test_cardinality GROUP BY name HAVING COUNT(DISTINCT email) >= 2; {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)