New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions to generate random values according to the distribution #42411
Conversation
These functions could be slow because standard library is used and a distribution object is initialized per each block. But they are really useful for testing other statistical functions |
The names are slightly strange. Maybe name them like
|
No problem, will do |
Can we add support for an additional "tag" argument for disambiguation, similarly to the existing |
Yes we also can. Initially thought about it, but since this functions will be used only for testing (from my perspective) then typical usecase won't involve multiple functions in the same query.. And it could be hard since these functions already accepts some arguments. We can add String argument as first in case if we want to differ functions. |
Have problem reproducing failures found by fuzzer. |
Implemented in [22.10](https://clickhouse.com/docs/en/whats-new/changelog/#new-feature-2) and delivered in ClickHouse#42411
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added functions (
randUniform
,randNormal
,randLogNormal
,randExponential
,randChiSquared
,randStudentT
,randFisherF
,randBernoulli
,randBinomial
,randNegativeBinomial
,randPoisson
) to generate random values according to the specified distributions. This closes #21834.