Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/15432
Documentation is printed as below now:
```sql
spark-sql> DESCRIBE FUNCTION EXTENDED RAND;
Function: rand
Class: org.apache.spark.sql.catalyst.expressions.Rand
Usage:
rand() - Returns a random column with i.i.d. uniformly distributed
values in [0, 1].
seed is given randomly.
rand(seed) - Returns a random column with i.i.d. uniformly
distributed values in [0, 1].
seed should be an integer/long/NULL literal.
Extended Usage:
> SELECT rand();
0.9629742951434543
> SELECT rand(0);
0.8446490682263027
> SELECT rand(NULL);
0.8446490682263027
Time taken: 3.799 seconds, Fetched 4 row(s)
spark-sql> DESCRIBE FUNCTION EXTENDED RANDN;
Function: randn
Class: org.apache.spark.sql.catalyst.expressions.Randn
Usage:
randn() - Returns a random column with i.i.d. gaussian random
distribution.
seed is given randomly.
randn(seed) - Returns a random column with i.i.d. gaussian random
distribution.
seed should be an integer/long/NULL literal.
Extended Usage:
> SELECT randn();
-0.3254147983080288
> SELECT randn(0);
1.1164209726833079
> SELECT randn(NULL);
1.1164209726833079
Time taken: 0.073 seconds, Fetched 4 row(s)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]