HyukjinKwon commented on code in PR #36145:
URL: https://github.com/apache/spark/pull/36145#discussion_r847937788


##########
python/pyspark/tests/test_statcounter.py:
##########
@@ -76,6 +76,31 @@ def test_merge_stats(self):
         self.assertEqual(stats.sum(), 20.0)
         self.assertAlmostEqual(stats.variance(), 1.25)
         self.assertAlmostEqual(stats.sampleVariance(), 1.4285714285714286)
+        for idx in range(2):

Review Comment:
   Can we create a list with:
   
   ```
               stats1 = StatCounter([1.0, 2.0])
               stats2 = StatCounter(range(1, 301))
               stats = stats1.mergeStats(stats2) if idx == 1 else 
stats2.mergeStats(stats1)
   ```
   
   and iterator with this `for`? Then I think we don't need to introduce this 
`idx`.



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