mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
random seed by default
This commit is contained in:
parent
48a2b46499
commit
045f5ae348
@ -88,7 +88,7 @@ AggregateFunctionPtr createAggregateFunctionGroupArraySample(const std::string &
|
||||
assertUnary(name, argument_types);
|
||||
|
||||
UInt64 max_elems = std::numeric_limits<UInt64>::max();
|
||||
UInt64 seed = 123456;
|
||||
UInt64 seed = thread_local_rng();
|
||||
|
||||
UInt64 * params[2] = {&max_elems, &seed};
|
||||
if (parameters.size() != 1 && parameters.size() != 2)
|
||||
|
@ -1,4 +1,4 @@
|
||||
select k, groupArraySample(10)(v) from (select number % 4 as k, number as v from numbers(1024)) group by k;
|
||||
select k, groupArraySample(10, 123456)(v) from (select number % 4 as k, number as v from numbers(1024)) group by k;
|
||||
|
||||
-- different seed
|
||||
select k, groupArraySample(10, 1)(v) from (select number % 4 as k, number as v from numbers(1024)) group by k;
|
||||
|
Loading…
Reference in New Issue
Block a user