mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added test with LowCardinality strings serialization.
This commit is contained in:
parent
95c64aa5a9
commit
f1c05a2192
@ -0,0 +1,25 @@
|
||||
NativeBlockInputStream
|
||||
LowCardinality(String) 123_a 2
|
||||
LowCardinality(String) 123_bb 3 123_
|
||||
LowCardinality(String) 123_ 1 123_a
|
||||
LowCardinality(String) 123_a 2 123_bb
|
||||
LowCardinality(String) 123_ccc 4 123_ccc
|
||||
LowCardinality(String) 123_a 2 123_dddd
|
||||
LowCardinality(String) 123_bb 3
|
||||
LowCardinality(String) 123_ 1
|
||||
LowCardinality(String) 123_dddd 5
|
||||
-
|
||||
LowCardinality(Nullable(String)) 123_a 3 \N
|
||||
LowCardinality(Nullable(String)) 0
|
||||
LowCardinality(Nullable(String)) 123_bb 4 123_
|
||||
LowCardinality(Nullable(String)) 123_ 2 123_a
|
||||
LowCardinality(Nullable(String)) 123_a 3 123_bb
|
||||
LowCardinality(Nullable(String)) 0 123_ccc
|
||||
LowCardinality(Nullable(String)) 123_ccc 5 123_dddd
|
||||
LowCardinality(Nullable(String)) 123_a 3 \N
|
||||
LowCardinality(Nullable(String)) 123_bb 4 \N
|
||||
LowCardinality(Nullable(String)) 123_ 2 \N
|
||||
LowCardinality(Nullable(String)) 123_dddd 6 \N
|
||||
MergeTree
|
||||
499500000
|
||||
499999500000
|
@ -0,0 +1,22 @@
|
||||
select 'NativeBlockInputStream';
|
||||
select toTypeName(dict), dict, lowCardinalityIndexes(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', 'bb', '', 'a', 'ccc', 'a', 'bb', '', 'dddd']) as v));
|
||||
select '-';
|
||||
select toTypeName(dict), dict, lowCardinalityIndexes(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', Null, 'bb', '', 'a', Null, 'ccc', 'a', 'bb', '', 'dddd']) as v));
|
||||
|
||||
select 'MergeTree';
|
||||
|
||||
drop table if exists test.lc_small_dict;
|
||||
drop table if exists test.lc_big_dict;
|
||||
|
||||
create table test.lc_small_dict (str StringWithDictionary) engine = MergeTree order by str;
|
||||
create table test.lc_big_dict (str StringWithDictionary) engine = MergeTree order by str;
|
||||
|
||||
insert into test.lc_small_dict select toString(number % 1000) from system.numbers limit 1000000;
|
||||
select sum(toUInt64OrZero(str)) from test.lc_small_dict;
|
||||
|
||||
insert into test.lc_big_dict select toString(number) from system.numbers limit 1000000;
|
||||
select sum(toUInt64OrZero(str)) from test.lc_big_dict;
|
||||
|
||||
drop table if exists test.lc_small_dict;
|
||||
drop table if exists test.lc_big_dict;
|
||||
|
Loading…
Reference in New Issue
Block a user