dgd-contributor commented on a change in pull request #33911:
URL: https://github.com/apache/spark/pull/33911#discussion_r706143532
##########
File path: python/pyspark/pandas/tests/data_type_ops/test_num_ops.py
##########
@@ -527,6 +527,32 @@ def test_ge(self):
for pser, psser in self.intergral_extension_pser_psser_pairs:
self.check_extension(pser >= pser, (psser >=
psser).sort_index())
+ def test_xor(self):
+ pdf, psdf = self.integral_pdf, self.integral_psdf
+ pser, other_pser = pdf["this"], pdf["that"]
+ psser, other_psser = psdf["this"], psdf["that"]
+
+ self.assert_eq(pser ^ other_pser, psser ^ other_psser)
+ self.assert_eq(pser ^ 2, psser ^ 2)
+ self.assert_eq(pser ^ 3, psser ^ 3)
+ self.assert_eq(pser ^ False, psser ^ False)
+ self.assert_eq(pser ^ True, psser ^ True)
+
+ with self.assertRaisesRegex(TypeError, "XOR can not be applied to
given types."):
+ psser ^ "a"
+
+ with option_context("compute.ops_on_diff_frames", True):
+ pser, other_pser = self.integral_pdf["this"], self.pdf["bool"]
+ psser, other_psser = self.integral_psdf["this"], self.psdf["bool"]
+
+ self.assert_eq(pser ^ other_pser, psser ^ other_psser)
+
+ def test_rxor(self):
Review comment:
updated
--
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]