Hi forideal, Currently, Blink planner with TableEnvironment supports multiple sinks optimization which will try best to reuse common sub-graph.
Best, Godfrey forideal <fszw...@163.com> 于2020年4月10日周五 下午4:31写道: > Hello > > There are 3 SQLs all querying the same table, but the generated GAG is > 3 independent topologies.I think, the better result is that there is one > Source and 3 Sinks. > > > create table good_sink (data varchar) with ( > 'connector.type' = 'console', > 'connector.dry-run' = 'false', > 'connector.property-version' = '1', > 'update-mode' = 'append');create table atomic_sink (data varchar) with ( > 'connector.type' = 'console', > 'connector.dry-run' = 'false', > 'connector.property-version' = '1', > 'update-mode' = 'append');create table bad_sink (data varchar) with ( > 'connector.type' = 'console', > 'connector.dry-run' = 'false', > 'connector.property-version' = '1', > 'update-mode' = 'append');create table source_stream (data varchar, `key` > varchar) with ( > xxx);insert into > good_sinkselect > datafrom > source_streamwhere > `key` = 'good';insert into > atomic_sinkselect > datafrom > source_streamwhere > `key` = 'atomic';insert into > atomic_sinkselect > datafrom > source_streamwhere > `key` = 'bad'; > > DAG picture Link: > https://pic4.zhimg.com/80/v2-7db1417bd2607d3a939f38cc19228df3_1440w.jpg > Question Link:https://zhuanlan.zhihu.com/p/128590984 > > Best Wishes > > > >