[ https://issues.apache.org/jira/browse/FLINK-18840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17174059#comment-17174059 ]
godfrey he commented on FLINK-18840: ------------------------------------ how about adding some methods in {{StatementSet}}, just like: {code:java} public interface StatementSet { // convert the given table to DataStream, do map/flapMap/xx through `function` <T> StatementSet addAppendStream(Table table, Class<T> clazz, Function<DataStream<T>, DataSink<?>> function); <T> StatementSet addRetractStream(Table table, Class<T> clazz, Function<DataStream<Tuple2<Boolean, T>>, DataSink<?>> function); // or unify the above two methods into one ? StatementSet addDataStream(Table table, Function<DataStream<Row>, DataSink<?>> function); } {code} pros: unified use interface, just like {{addInsertSql}} and {{addInsert}}. and we can use {{StatementSet#execute}} to execute SQL/Table/DataStream as a whole job. cons: we need add dependency {{flink-streaming-java}} for {{flink-table-api-java}} > Support StatementSet with DataStream API > ---------------------------------------- > > Key: FLINK-18840 > URL: https://issues.apache.org/jira/browse/FLINK-18840 > Project: Flink > Issue Type: New Feature > Components: Table SQL / API > Reporter: Timo Walther > Priority: Major > > Currently, users of the {{StreamTableEnvironment}} cannot not translate a > {{StatementSet}} to DataStream API. -- This message was sent by Atlassian Jira (v8.3.4#803005)