8
0
key_type
key_string
key_string_two_level
key_fixed_string
key_int64
key_int64_two_level
key_int32
key_int32_two_level
Key_int16
key_int8
CREATE TABLE t_nullable
(
key_string Nullable(String),
key_string_two_level Nullable(String),
key_fixed_string Nullable(FixedString(3)),
key_int64 Nullable(Int64),
key_int64_two_level Nullable(Int64),
key_int32 Nullable(Int32),
key_int32_two_level Nullable(Int32),
Key_int16 Nullable(Int16),
key_int8 Nullable(Int8),
i1 Nullable(Int64),
i2 Nullable(Int64),
)
ENGINE = MergeTree
ORDER BY tuple()
insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000)
insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000)
insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000)
insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000)
OPTIMIZE TABLE t_nullable FINAL
select min(i1), min(i2) from t_nullable group by {key_type} format Null
drop table if exists t_nullable