fix test minmax_index*

This commit is contained in:
Nikita Vasilev 2019-01-21 12:53:25 +03:00
parent c32d1983a0
commit 9f1a093e0c
2 changed files with 17 additions and 10 deletions

View File

@ -8,12 +8,15 @@ CREATE TABLE test.minmax_idx
d Decimal(10, 2),
s String,
e Enum8('a' = 1, 'b' = 2, 'c' = 3),
dt Date
dt Date,
INDEX
idx_all (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 4,
INDEX
idx_all2 (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
INDEX
idx_2 (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
) ENGINE = MergeTree()
ORDER BY u64
INDICES idx_all BY (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 4,
idx_all2 BY (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
idx_2 BY (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
SETTINGS index_granularity = 2;

View File

@ -9,11 +9,13 @@ CREATE TABLE test.minmax_idx1
d Decimal(10, 2),
s String,
e Enum8('a' = 1, 'b' = 2, 'c' = 3),
dt Date
dt Date,
INDEX
idx_all (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
INDEX
idx_2 (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/minmax', 'r1')
ORDER BY u64
INDICES idx_all BY (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
idx_2 BY (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
SETTINGS index_granularity = 2;
CREATE TABLE test.minmax_idx2
@ -24,11 +26,13 @@ CREATE TABLE test.minmax_idx2
d Decimal(10, 2),
s String,
e Enum8('a' = 1, 'b' = 2, 'c' = 3),
dt Date
dt Date,
INDEX
idx_all (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
INDEX
idx_2 (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/minmax', 'r2')
ORDER BY u64
INDICES idx_all BY (i32, i32 + f64, d, s, e, dt) TYPE minmax GRANULARITY 2,
idx_2 BY (u64 + toYear(dt), substring(s, 2, 4)) TYPE minmax GRANULARITY 3
SETTINGS index_granularity = 2;