HuangXingBo commented on code in PR #19878:
URL: https://github.com/apache/flink/pull/19878#discussion_r899713731


##########
flink-python/pyflink/datastream/data_stream.py:
##########
@@ -561,13 +580,42 @@ def forward(self) -> 'DataStream':
         """
         return DataStream(self._j_data_stream.forward())
 
+    @overload
     def broadcast(self) -> 'DataStream':
+        pass
+
+    @overload
+    def broadcast(self, *args) -> 'BroadcastStream':

Review Comment:
   add the typeint `MapStateDescriptor`?



##########
flink-python/pyflink/datastream/data_stream.py:
##########
@@ -561,13 +580,42 @@ def forward(self) -> 'DataStream':
         """
         return DataStream(self._j_data_stream.forward())
 
+    @overload
     def broadcast(self) -> 'DataStream':
+        pass
+
+    @overload
+    def broadcast(self, *args) -> 'BroadcastStream':
+        pass
+
+    def broadcast(self, *args):

Review Comment:
   add the typehint too?



##########
flink-python/pyflink/datastream/data_stream.py:
##########
@@ -1586,7 +1634,7 @@ def rebalance(self) -> 'DataStream':
     def forward(self) -> 'DataStream':
         raise Exception('Cannot override partitioning for KeyedStream.')
 
-    def broadcast(self) -> 'DataStream':
+    def broadcast(self, *args):

Review Comment:
   ditto



##########
flink-python/pyflink/datastream/data_stream.py:
##########
@@ -484,15 +486,32 @@ def union(self, *streams: 'DataStream') -> 'DataStream':
         j_united_stream = self._j_data_stream.union(j_data_stream_arr)
         return DataStream(j_data_stream=j_united_stream)
 
+    @overload
     def connect(self, ds: 'DataStream') -> 'ConnectedStreams':
+        pass
+
+    @overload
+    def connect(self, ds: 'BroadcastStream') -> 'BroadcastConnectedStream':
+        pass
+
+    def connect(self, ds):

Review Comment:
   add the typeint `Union['DataStream', 'BroadcastStream']`?



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to