HuangXingBo commented on a change in pull request #14991:
URL: https://github.com/apache/flink/pull/14991#discussion_r582795267



##########
File path: flink-python/pyflink/datastream/state.py
##########
@@ -311,3 +328,33 @@ def __init__(self, name: str, key_type_info: 
TypeInformation, value_type_info: T
         :param value_type_info: the type information of the value.
         """
         super(MapStateDescriptor, self).__init__(name, 
Types.MAP(key_type_info, value_type_info))
+
+
+class ReducingStateDescriptor(StateDescriptor):
+    """
+    StateDescriptor for ReducingState. This can be used to create partitioned 
reducing state using
+    RuntimeContext.get_reducing_state(ReducingStateDescriptor).
+    """
+
+    def __init__(self,
+                 name: str,
+                 reduce_function,
+                 type_info: TypeInformation):
+        """
+        Constructor of the ReducingStateDescriptor.
+
+        :param name: The name of the state.
+        :param reduce_function: The ReduceFunction used to aggregate the state.
+        :param type_info:

Review comment:
       ```suggestion
           :param type_info: The type of the values in the state.
   ```




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