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

Fabian Hueske commented on FLINK-8545:
--------------------------------------

Yes, you are right. We also need to support a deletion flag.

What do you think about requiring the same format as is ingested by an 
{{UpsertStreamTableSink}}, i.e., {{DataStream[(Boolean, X)]}}, where the 
{{Boolean}} field is the deletion flag and {{X}} is the record (Tuple, Pojo, 
CaseClass) that is ingested. This would keep the deletion flag out of the 
schema which would be good IMO because it is meta-information.

The problem of deletes on non-inserted keys could be addressed by having a 
stateful scan operator that generates the upsert table instead of immediately 
forwarding records to the operators (like an aggregation). We would need this 
as well if we want to upsert in event-time order.

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

Reply via email to