1. [SPARK-31306][DOCS] update rand() function documentation to indicate (details)
Commit e226f687c172c63ce9ae6531772af9df124c9454 by gurwls223
[SPARK-31306][DOCS] update rand() function documentation to indicate
exclusive upper bound
### What changes were proposed in this pull request? A small
documentation change to clarify that the `rand()` function produces
values in `[0.0, 1.0)`.
### Why are the changes needed?
`rand()` uses `Rand()` - which generates values in [0, 1) ([documented
The existing documentation suggests that 1.0 is a possible value
returned by rand (i.e for a distribution written as `X ~ U(a, b)`, x can
be a or b, so `U[0.0, 1.0]` suggests the value returned could include
### Does this PR introduce any user-facing change? Only documentation
### How was this patch tested? Documentation changes only.
Closes #28071 from Smeb/master.
Authored-by: Ben Ryves <> Signed-off-by:
HyukjinKwon <>
The file was modifiedpython/pyspark/sql/ (diff)
The file was modifiedR/pkg/R/functions.R (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/functions.scala (diff)