xiedeyantu opened a new pull request, #22147: URL: https://github.com/apache/datafusion/pull/22147
## Which issue does this PR close? - Closes #. ## Rationale for this change `rand()` is a common alias for `random()` in SQL engines. Supporting it improves compatibility and lets users write `rand()` as an equivalent zero-argument volatile random function. ## What changes are included in this PR? - Adds `rand` as an alias for the existing `random()` scalar function. - Adds a sqllogictest case verifying that `rand()` resolves successfully and returns a `Float64` value in the expected `[0, 1)` range. ## Are these changes tested? Yes. - `cargo fmt --all` - `cargo test --package datafusion-functions random --lib` - `cargo test --features backtrace,parquet_encryption --profile ci --package datafusion-sqllogictest --test sqllogictests -- functions.slt` ## Are there any user-facing changes? Yes. Users can now call `rand()` as an alias for `random()`. -- 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]
