You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/02 09:26:58 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #37748: [SPARK-40210][PYTHON] Fix math atan2, hypot, pow and pmod float argument call
zhengruifeng commented on code in PR #37748:
URL: https://github.com/apache/spark/pull/37748#discussion_r961482449
##########
python/pyspark/sql/tests/test_functions.py:
##########
@@ -1029,6 +1034,11 @@ def test_np_scalar_input(self):
res = df.select(array_position(df.data, dtype(1)).alias("c")).collect()
self.assertEqual([Row(c=1), Row(c=0)], res)
+ def test_binary_math_function(self):
+ for func, res in [(atan2, 0.13664), (hypot, 8.07527), (pow, 2.14359), (pmod, 1.1)]:
+ df = self.spark.range(1).select(round(func(1.1, 8), 5).alias("a"))
+ self.assertEqual(Row(a=res), df.first())
Review Comment:
oops, I did see this comment when I was merging this ...
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org