pvary commented on issue #8719: URL: https://github.com/apache/iceberg/issues/8719#issuecomment-1757039591
@Gerrrr: Sorry, but I do not understand your question. In upsert mode something like this should be the answer: ``` Flink SQL> SELECT * FROM word_count LIMIT 10; +----+--------------------------------+----------------------+ | op | word | cnt | +----+--------------------------------+----------------------+ | +I | d | 36782 | | +I | d | 36783 | | +I | 8 | 36986 | | +I | 8 | 36987 | | +I | 7 | 36870 | | +I | 7 | 36871 | | +I | 5 | 37149 | | +I | 5 | 37150 | | +I | 0 | 37029 | | +I | 0 | 37030 | +----+--------------------------------+----------------------+ ``` In a retract stream something like this should be the answer: ``` Flink SQL> SELECT word, COUNT(*) FROM word_table GROUP BY word; +----+--------------------------------+----------------------+ | op | word | EXPR$1 | +----+--------------------------------+----------------------+ | +I | 6 | 1 | | +I | 8 | 1 | | +I | f | 1 | | +I | c | 1 | | +I | b | 1 | | -U | 8 | 1 | | +U | 8 | 2 | | +I | 1 | 1 | | +I | a | 1 | | -U | 8 | 2 | | +U | 8 | 3 | | -U | 6 | 1 | | +U | 6 | 2 | | +I | 9 | 1 | | +I | e | 1 | ``` Flink uses equality deletes to apply `-D`, `-U` records to the table, by removing the record based on the key. If we have a keyless table, and we have multiple rows with the exact same values in the table, then if we receive a -D`, `-U` record, then equality delete will remove both occurrences of the given row. Which would be problematic, as only a single row should be removed in this case. So supporting keyless Apache Flink tables is not a feature which could be easily accomplished with the current architecture. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org