Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

max_rand_* session settings

These settings are available in system.settings and are autogenerated from source.

max_rand_distribution_parameter

Type
Float
Default
1000000
Version history
VersionDefault valueComment
26.41000000New setting to limit shape parameters in random distribution functions, preventing hangs with extreme inputs.

Maximum value for distribution shape parameters in random distribution functions such as randChiSquared, randStudentT, and randFisherF. This prevents extremely long computation times with extreme parameter values. 0 disables the limit; values for which the sampler does not terminate at all are still rejected.

max_rand_distribution_trials

Type
UInt64
Default
1000000000
Version history
VersionDefault valueComment
26.41000000000New setting to limit trial counts in random distribution functions, preventing hangs with extreme inputs.

Maximum number of trials allowed for random distribution functions such as randBinomial and randNegativeBinomial. This prevents extremely long computation times with large trial counts. 0 disables the limit, and the setting may be raised above its default, except for randBinomial with a probability strictly between 0 and 1, which always rejects more than 10^9 trials because the cost of a single sample is proportional to the number of trials in the worst case, with a probability that grows with it. The probabilities 0 and 1 are exempt from that hard cap, because a sample costs constant time for them.

Navigation