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

Hequn Cheng commented on FLINK-8578:
------------------------------------

[~fhueske] Thanks for your suggestions. You are right. I think we need to 
specify a field to order records. Even we restrict upsert mode to be same with 
table mode, i.e, proc-time to proc-time and row-time to row-time. There is a 
chance that records with different order share a same rowtime. The order field 
can be an auto-increment id. It's type can also be a String. 

We haven't discussed about how to handle time attributes after the upsert 
conversion. I think we need to materialize the proc-time field or we can't 
perform a correct retraction.

> Implement rowtime DataStream to Table upsert conversion.
> --------------------------------------------------------
>
>                 Key: FLINK-8578
>                 URL: https://issues.apache.org/jira/browse/FLINK-8578
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Hequn Cheng
>            Assignee: Hequn Cheng
>            Priority: Major
>
> Flink-8577 implements upsert from stream under proctime. This task is going 
> to solve the order problem introduce by proctime. As proposed by Fabian in 
> FLINK-8545, it would be good to be able to declare a time attribute that 
> decides whether an upsert is performed or not.
> {code:java}
> Table table = tEnv.upsertFromStream(input, 'a, 'b.rowtime.upsertOrder, 'c.key)
> {code}
> This is a good way to solve the order problem using rowtime. And an idea 
> comes to my mind that we can even remove the `.upsertOrder`, because the 
> rowtime attribute can only be defined once in a table schema. Removing 
> `.upsertOrder` also makes it easier to design api for TableSource and sql, 
> i.e, we don't need to add another new feature for the api.
> Any suggestions are welcomed!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to