mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Add test 02725_any_join_single_row
This commit is contained in:
parent
62f950ddaf
commit
0f0958f82d
@ -0,0 +1,3 @@
|
||||
Join(ANY, LEFT, key) 0 1
|
||||
Join(ANY, LEFT, key) 1 1
|
||||
Join(ANY, LEFT, key) 1 1
|
26
tests/queries/0_stateless/02725_any_join_single_row.sql
Normal file
26
tests/queries/0_stateless/02725_any_join_single_row.sql
Normal file
@ -0,0 +1,26 @@
|
||||
CREATE TABLE join_test
|
||||
(
|
||||
`key` UInt64,
|
||||
`value` UInt64
|
||||
)
|
||||
ENGINE = Join(ANY, LEFT, key);
|
||||
|
||||
CREATE TEMPORARY TABLE initial_table_size AS
|
||||
SELECT engine_full, total_rows, total_bytes FROM system.tables WHERE (name = 'join_test') AND (database = currentDatabase());
|
||||
|
||||
SELECT engine_full, total_rows, total_bytes < 100_000 FROM initial_table_size;
|
||||
|
||||
INSERT INTO join_test (key, value) SELECT 1, number FROM numbers(1);
|
||||
|
||||
|
||||
CREATE TEMPORARY TABLE one_row_table_size AS
|
||||
SELECT engine_full, total_rows, total_bytes FROM system.tables WHERE (name = 'join_test') AND (database = currentDatabase());
|
||||
|
||||
SELECT engine_full, total_rows, total_bytes < 2 * (SELECT total_bytes FROM initial_table_size) FROM one_row_table_size;
|
||||
|
||||
INSERT INTO join_test (key, value) SELECT 1, number FROM numbers(1);
|
||||
INSERT INTO join_test (key, value) SELECT 1, number FROM numbers(1);
|
||||
INSERT INTO join_test (key, value) SELECT 1, number FROM numbers(1);
|
||||
INSERT INTO join_test (key, value) SELECT 1, number FROM numbers(10_000);
|
||||
|
||||
SELECT engine_full, total_rows, total_bytes == (SELECT total_bytes FROM one_row_table_size) FROM system.tables WHERE (name = 'join_test') AND (database = currentDatabase());
|
Loading…
Reference in New Issue
Block a user