flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From godfrey he <godfre...@gmail.com>
Subject Re: Blink Planner Retracting Streams
Date Wed, 17 Jun 2020 05:15:25 GMT
hi John,

You can use Tuple2[Boolean, Row] to replace CRow, the
StreamTableEnvironment#toRetractStream method return DataStream[(Boolean,
T)].

the code looks like:

tEnv.toRetractStream[Row](table).map(new MapFunction[(Boolean, Row), R] {
      override def map(value: (Boolean, Row)): R = ...
    })

Bests,
Godfrey

John Mathews <jmathews3773@gmail.com> 于2020年6月17日周三 下午12:13写道:

> Hello,
>
> I am working on migrating from the flink table-planner to the new blink
> one, and one problem I am running into is that it doesn't seem like Blink
> has a concept of a CRow, unlike the original table-planner.
>
> I am therefore struggling to figure out how to properly convert a
> retracting stream to a SingleOutputStreamOperator when using just the Blink
> planner libraries.
>
> E.g. in the old planner I could do something like this:
> SingleOutputStreamOperator<CRow> stream =
> tableEnvironment.toRetractStream(table, typeInfo)
>                     .map(value -> new CRow(value.f1, value.f0);
>
> but without the CRow, I'm not sure how to accomplish this.
>
> Any suggestions?
>
> Thanks!
> John
>
>
>

Mime
View raw message