dgd-contributor commented on a change in pull request #33858:
URL: https://github.com/apache/spark/pull/33858#discussion_r711414907



##########
File path: python/pyspark/pandas/tests/test_ops_on_diff_frames.py
##########
@@ -1839,6 +1839,40 @@ def _test_cov(self, pser1, pser2):
         pscov = psser1.cov(psser2, min_periods=3)
         self.assert_eq(pcov, pscov, almost=True)
 
+    def test_combine(self):
+        def run_test_combine(pser1, pser2):
+            psser1 = ps.from_pandas(pser1)
+            psser2 = ps.from_pandas(pser2)
+
+            self.assert_eq(pser1.combine(pser2, max), psser1.combine(psser2, 
max))
+            self.assert_eq(
+                pser1.combine(pser2, max, fill_value=1),
+                psser1.combine(psser2, max, fill_value=1),
+            )
+            self.assert_eq(pser2.combine(300, max), psser2.combine(300, max))
+            self.assert_eq(
+                pser2.combine(300, max, fill_value=100),
+                psser2.combine(300, max, fill_value=100),
+            )
+
+        pser1 = pd.Series({"falcon": 330.0, "eagle": 160.0}, name="s1")
+        pser2 = pd.Series({"falcon": 345.0, "eagle": 200.0, "duck": 30.0}, 
name="s2")
+        run_test_combine(pser1, pser2)
+
+        pser1 = pd.Series({"falcon": 330.0, "eagle": 160.0}, name="same-name")
+        pser2 = pd.Series({"falcon": 345.0, "eagle": 200.0, "duck": 30.0}, 
name="same-name")
+        run_test_combine(pser1, pser2)
+

Review comment:
       I added that test and fixed an issue with multi-index. Please take a 
look when you have time.




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