hequn8128 commented on a change in pull request #13098:
URL: https://github.com/apache/flink/pull/13098#discussion_r468370363



##########
File path: flink-python/pyflink/datastream/data_stream.py
##########
@@ -434,6 +465,16 @@ def flat_map(self, func: Union[Callable, FlatMapFunction], 
type_info: TypeInform
             -> 'DataStream':
         return self._values().flat_map(func, type_info)
 
+    def filter(self, func: Union[Callable, FilterFunction]) -> 'DataStream':
+        return self._values().filter(func)
+
+    def add_sink(self, sink_func: SinkFunction) -> 'DataStreamSink':
+        return self._values().add_sink(sink_func)
+
+    def key_by(self, key_selector: Union[Callable, KeySelector],
+               key_type_info: TypeInformation = None) -> 'KeyedStream':
+        return self._values().key_by(key_selector, key_type_info)

Review comment:
       There are side effects for this implementation. If we perform multi 
key_by, it will also introduce multi maps in the stream graph. This should be 
avoided. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to