mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
create test
This commit is contained in:
parent
28840c79ed
commit
f8c0f4697c
@ -0,0 +1 @@
|
||||
"rows_read": 0,
|
27
dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh
Executable file
27
dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.set_idx;"
|
||||
|
||||
$CLICKHOUSE_CLIENT -n --query="
|
||||
SET allow_experimental_data_skipping_indices = 1;
|
||||
CREATE TABLE test.set_idx
|
||||
(
|
||||
u64 UInt64,
|
||||
i32 Int32,
|
||||
INDEX idx (i32) TYPE set(2) GRANULARITY 1
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY u64
|
||||
SETTINGS index_granularity = 6;"
|
||||
|
||||
$CLICKHOUSE_CLIENT --query="
|
||||
INSERT INTO test.set_idx
|
||||
SELECT number, number FROM system.numbers LIMIT 100"
|
||||
|
||||
# simple select
|
||||
$CLICKHOUSE_CLIENT --query="SELECT * FROM test.set_idx WHERE i32 > 0 FORMAT JSON" | grep "rows_read"
|
||||
|
||||
|
||||
$CLICKHOUSE_CLIENT --query="DROP TABLE test.set_idx;"
|
Loading…
Reference in New Issue
Block a user