forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix topK/topKWeighted merge (wtih non-default parameters)
- Loading branch information
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AggregateFunctionTopK | ||
20 | ||
20 | ||
AggregateFunctionTopKGenericData | ||
20 | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
drop table if exists data_01409; | ||
create table data_01409 engine=Memory as select * from numbers(20); | ||
|
||
-- easier to check merging via distributed tables | ||
-- but can be done vai topKMerge(topKState()) as well | ||
|
||
select 'AggregateFunctionTopK'; | ||
select length(topK(20)(number)) from remote('127.{1,1}', currentDatabase(), data_01409); | ||
select length(topKWeighted(20)(number, 1)) from remote('127.{1,1}', currentDatabase(), data_01409); | ||
|
||
select 'AggregateFunctionTopKGenericData'; | ||
select length(topK(20)((number, ''))) from remote('127.{1,1}', currentDatabase(), data_01409); | ||
select length(topKWeighted(20)((number, ''), 1)) from remote('127.{1,1}', currentDatabase(), data_01409); |