From 95fb9132d1ed523f627cb1ced3299f5d3b814629 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Thu, 9 May 2019 15:30:32 +0300 Subject: [PATCH] fix materialize test --- dbms/tests/queries/0_stateless/00943_materialize_index.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00943_materialize_index.sh b/dbms/tests/queries/0_stateless/00943_materialize_index.sh index 6638065480f..4625025da20 100755 --- a/dbms/tests/queries/0_stateless/00943_materialize_index.sh +++ b/dbms/tests/queries/0_stateless/00943_materialize_index.sh @@ -7,13 +7,11 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.minmax_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices=1; CREATE TABLE test.minmax_idx ( u64 UInt64, i64 Int64, - i32 Int32, - INDEX idx (i64, u64 * i64) TYPE minmax GRANULARITY 1 + i32 Int32 ) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 2;" @@ -34,6 +32,10 @@ $CLICKHOUSE_CLIENT --query="INSERT INTO test.minmax_idx VALUES $CLICKHOUSE_CLIENT --query="SELECT count() FROM test.minmax_idx WHERE i64 = 2;" $CLICKHOUSE_CLIENT --query="SELECT count() FROM test.minmax_idx WHERE i64 = 2 FORMAT JSON" | grep "rows_read" +$CLICKHOUSE_CLIENT -n --query=" +SET allow_experimental_data_skipping_indices=1; +ALTER TABLE test.minmax_idx ADD INDEX idx (i64, u64 * i64) TYPE minmax GRANULARITY 1;" + $CLICKHOUSE_CLIENT --query="ALTER TABLE test.minmax_idx MATERIALIZE INDEX idx;" $CLICKHOUSE_CLIENT --query="SELECT count() FROM test.minmax_idx WHERE i64 = 2;"