dchvn commented on a change in pull request #34435:
URL: https://github.com/apache/spark/pull/34435#discussion_r751811590



##########
File path: python/pyspark/statcounter.py
##########
@@ -53,12 +54,12 @@ def merge(self, value):
         return self
 
     # Merge another StatCounter into this one, adding up the internal 
statistics.
-    def mergeStats(self, other):
+    def mergeStats(self, other: "StatCounter") -> "StatCounter":
         if not isinstance(other, StatCounter):
             raise TypeError("Can only merge StatCounter but got %s" % 
type(other))
 
         if other is self:  # reference equality holds
-            self.merge(copy.deepcopy(other))  # Avoid overwriting fields in a 
weird order
+            self.mergeStats(copy.deepcopy(other))  # Avoid overwriting fields 
in a weird order

Review comment:
       Should I just add # type: ignore like: `self.merge(copy.deepcopy(other)) 
 # type: ignore` and create a new Jira ticket with UT for this issue? @zero323 
, @ueshin , @HyukjinKwon 
   Many thanks!




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to