[ https://issues.apache.org/jira/browse/FLINK-8545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579726#comment-16579726 ]
Piotr Nowojski commented on FLINK-8545: --------------------------------------- This `AppendStreamTable` would still carry on deletes (`change` flag from `CRow`), so wouldn't it be confusing name? Also do we have to expose in API ({{UpsertStreamTable)}} how are the updates encoded? Shouldn't those be just traits of the underlying stream? I mean that stream created from upsert source, could just have a trait {{primary_key}} and maybe flag that it's {{upsert}}. If such stream is incompatible with required input of some operator, we would place there {{UpsertToRetractOperator}} that would change the upsert stream back into retraction stream. Such operator would need to hold whole table on state (maybe pruning on watermarks), but such construct would be able to support upsert sources in all queries. It would also allow us to easier optimize queries in the future. For example: # Reorder {{UpsertToRetractOperator}} with filters # Reorder {{UpsertToRetractOperator}} with projections # Remove {{UpsertToRetractOperator}} if following operator can handle upserts (like UpsertDataSink, or Joins) > Implement upsert stream table source > ------------------------------------- > > Key: FLINK-8545 > URL: https://issues.apache.org/jira/browse/FLINK-8545 > Project: Flink > Issue Type: New Feature > Components: Table API & SQL > Reporter: Hequn Cheng > Assignee: Hequn Cheng > Priority: Major > > As more and more users are eager for ingesting data with upsert mode in flink > sql/table-api, it is valuable to enable table source with upsert mode. I will > provide a design doc later and we can have more discussions. Any suggestions > are warmly welcomed ! > -- This message was sent by Atlassian JIRA (v7.6.3#76005)