mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
add 02241_join_rocksdb
This commit is contained in:
parent
51a6c347ad
commit
ad06dd3fe9
34
tests/queries/0_stateless/02241_join_rocksdb.reference
Normal file
34
tests/queries/0_stateless/02241_join_rocksdb.reference
Normal file
@ -0,0 +1,34 @@
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
41
tests/queries/0_stateless/02241_join_rocksdb.sql.j2
Normal file
41
tests/queries/0_stateless/02241_join_rocksdb.sql.j2
Normal file
@ -0,0 +1,41 @@
|
||||
SET join_algorithm = 'direct';
|
||||
|
||||
{% for table_size in [10, 65555, 100000] -%}
|
||||
|
||||
CREATE OR REPLACE TABLE rdb (key UInt64, value String) ENGINE = EmbeddedRocksDB PRIMARY KEY (key);
|
||||
INSERT INTO rdb SELECT (sipHash64(number) % {{ table_size }}) as key, ('val' || toString(key)) as value FROM numbers_mt({{ table_size }});
|
||||
|
||||
{% for block_size in [10, 11, 128, 129, 65505, 65506, 70000] -%}
|
||||
|
||||
{% if block_size * 5000 > table_size -%}
|
||||
|
||||
SET max_block_size = {{ block_size }};
|
||||
|
||||
SELECT count() == (SELECT count() FROM rdb WHERE key < {{ table_size // 2 }})
|
||||
FROM (SELECT number as k FROM numbers_mt({{ table_size // 2 }})) as t1
|
||||
INNER JOIN rdb
|
||||
ON rdb.key == t1.k;
|
||||
|
||||
SELECT count() == (SELECT count() FROM rdb WHERE key < {{ table_size + table_size // 4 + 1 }})
|
||||
FROM (SELECT number as k FROM numbers_mt({{ table_size + table_size // 4 + 1 }})) as t1
|
||||
INNER JOIN rdb
|
||||
ON rdb.key == t1.k;
|
||||
|
||||
{% endif -%}
|
||||
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
|
||||
SELECT count()
|
||||
FROM (SELECT number as k FROM numbers_mt(10)) as t1
|
||||
INNER JOIN rdb
|
||||
ON rdb.key + 1 == t1.k; -- { serverError UNSUPPORTED_METHOD }
|
||||
|
||||
SELECT count()
|
||||
FROM (SELECT number as k FROM numbers_mt(10)) as t1
|
||||
INNER JOIN (SELECT * FROM rdb) AS rdb
|
||||
ON rdb.key == t1.k; -- { serverError UNSUPPORTED_METHOD }
|
||||
|
||||
DROP TABLE rdb;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user