mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Add a test to cover non-const tuple elemenets (just in case)
This commit is contained in:
parent
b1d2d55cba
commit
c95d09aed0
@ -1,2 +1,4 @@
|
||||
1
|
||||
"rows_read": 2,
|
||||
1
|
||||
"rows_read": 2,
|
||||
|
@ -7,6 +7,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
|
||||
$CLICKHOUSE_CLIENT --multiquery <<EOF
|
||||
DROP TABLE IF EXISTS pk_in_tuple_perf;
|
||||
CREATE TABLE pk_in_tuple_perf
|
||||
(
|
||||
v UInt64,
|
||||
@ -22,3 +23,23 @@ query="SELECT count() FROM pk_in_tuple_perf WHERE (v, u) IN ((2, 10), (2, 20))"
|
||||
|
||||
$CLICKHOUSE_CLIENT --query "$query"
|
||||
$CLICKHOUSE_CLIENT --query "$query FORMAT JSON" | grep "rows_read"
|
||||
|
||||
## Test with non-const args in tuple
|
||||
|
||||
$CLICKHOUSE_CLIENT --multiquery <<EOF
|
||||
DROP TABLE IF EXISTS pk_in_tuple_perf_non_const;
|
||||
CREATE TABLE pk_in_tuple_perf_non_const
|
||||
(
|
||||
d Date,
|
||||
u UInt32
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY (u, d)
|
||||
SETTINGS index_granularity = 1;
|
||||
|
||||
INSERT INTO pk_in_tuple_perf_non_const SELECT today() - number, number FROM numbers(100);
|
||||
EOF
|
||||
|
||||
query="SELECT count() FROM pk_in_tuple_perf_non_const WHERE (u, d) IN ((0, today()), (1, today()))"
|
||||
|
||||
$CLICKHOUSE_CLIENT --query "$query"
|
||||
$CLICKHOUSE_CLIENT --query "$query FORMAT JSON" | grep "rows_read"
|
||||
|
Loading…
Reference in New Issue
Block a user