2018-08-08 15:28:19 +00:00
|
|
|
select 'NativeBlockInputStream';
|
2018-09-08 23:15:12 +00:00
|
|
|
select toTypeName(dict), dict, lowCardinalityIndices(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', 'bb', '', 'a', 'ccc', 'a', 'bb', '', 'dddd']) as v));
|
2018-08-08 15:28:19 +00:00
|
|
|
select '-';
|
2018-09-08 23:15:12 +00:00
|
|
|
select toTypeName(dict), dict, lowCardinalityIndices(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', Null, 'bb', '', 'a', Null, 'ccc', 'a', 'bb', '', 'dddd']) as v));
|
2018-08-08 15:28:19 +00:00
|
|
|
|
|
|
|
select 'MergeTree';
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists lc_small_dict;
|
|
|
|
drop table if exists lc_big_dict;
|
2018-08-08 15:28:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
create table lc_small_dict (str StringWithDictionary) engine = MergeTree order by str;
|
|
|
|
create table lc_big_dict (str StringWithDictionary) engine = MergeTree order by str;
|
2018-08-08 15:28:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
insert into lc_small_dict select toString(number % 1000) from system.numbers limit 1000000;
|
|
|
|
insert into lc_big_dict select toString(number) from system.numbers limit 1000000;
|
2018-08-09 10:48:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
detach table lc_small_dict;
|
|
|
|
detach table lc_big_dict;
|
2018-08-09 10:48:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
attach table lc_small_dict;
|
|
|
|
attach table lc_big_dict;
|
2018-08-09 10:48:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
select sum(toUInt64OrZero(str)) from lc_small_dict;
|
|
|
|
select sum(toUInt64OrZero(str)) from lc_big_dict;
|
2018-08-08 15:28:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists lc_small_dict;
|
|
|
|
drop table if exists lc_big_dict;
|
2018-08-08 15:28:19 +00:00
|
|
|
|