[
https://issues.apache.org/jira/browse/FLINK-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16357000#comment-16357000
]
Timo Walther commented on FLINK-8577:
-------------------------------------
Yes, I also prefer option 1. Always require a flag. This also keeps the number
of possible methods small and thus the API concise.
{code}
// always require flags
table = tEnv.upsertFromStream(flaggedInput, 'a, 'b, 'c.key)
// always require flags, so add them manually
table = tEnv.upsertFromStream(input.map(new InsertFlagger()), 'a, 'b, 'c.key)
{code}
> Implement proctime DataStream to Table upsert conversion.
> ---------------------------------------------------------
>
> Key: FLINK-8577
> URL: https://issues.apache.org/jira/browse/FLINK-8577
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
>
> Api will looks like:
> {code:java}
> DataStream[(String, Long, Int)] input = ???
> // upsert with keyTable
> table = tEnv.upsertFromStream(input, 'a, 'b, 'c.key)
> // upsert without key -> single row tableTable
> table = tEnv.upsertFromStream(input, 'a, 'b, 'c){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)