mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add test on topKWeighted function
This commit is contained in:
parent
81e39744e2
commit
85151b339b
@ -304,7 +304,6 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void push(Counter * counter)
|
||||
{
|
||||
counter->slot = counter_list.size();
|
||||
|
@ -1,2 +1,3 @@
|
||||
['hello','world'] ['hello','world']
|
||||
['goodbye','hello'] ['hello','world']
|
||||
[99,98,97,96,95]
|
||||
|
@ -1,2 +1,3 @@
|
||||
SELECT topKWeighted(2)(x, weight), topK(2)(x) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([('hello', 1), ('world', 1), ('goodbye', 1), ('abc', 1)]) AS t));
|
||||
SELECT topKWeighted(2)(x, weight), topK(2)(x) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([('hello', 1), ('world', 1), ('goodbye', 2), ('abc', 1)]) AS t));
|
||||
SELECT topKWeighted(5)(n, weight) FROM (SELECT number as n, number as weight from system.numbers LIMIT 100);
|
||||
|
Loading…
Reference in New Issue
Block a user