rwpenney commented on a change in pull request #30745:
URL: https://github.com/apache/spark/pull/30745#discussion_r541916314
##########
File path: python/pyspark/sql/functions.py
##########
@@ -208,6 +208,14 @@ def sumDistinct(col):
return _invoke_function_over_column("sumDistinct", col)
+@since(3.2)
+def product(col, scale=1.0):
+ """
+ Aggregate function: returns the product of the values in a group.
+ """
Review comment:
I agree that having some documentation, with examples, would be very
helpful and I've added these following your advice. However, it seems like the
automated build tests are insanely restrictive in their validation of these
doctests, causing multiple building failures when the pydoc examples differ by
inconsequential whitespace or formatting changes. For example, even when I have
directly copy-pasted example outputs from a pyspark session, these were
rejected by the build-system.
Can I suggest that someone investigates whether the build-system can make
these documentation checks more tolerant of whitespace variations, which I'd
expect will trip-up many developers and will create obstacles for producing
documentation that would benefit Spark users?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]