From 63e9204c5247f630d95a705b12bf1b84676895c8 Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Wed, 23 Oct 2024 15:39:37 +0100 Subject: [PATCH] fix --- tests/integration/test_peak_memory_usage/test.py | 2 +- .../queries/0_stateless/00225_join_duplicate_columns.sql | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_peak_memory_usage/test.py b/tests/integration/test_peak_memory_usage/test.py index f447c527d9b..8281b3dea73 100644 --- a/tests/integration/test_peak_memory_usage/test.py +++ b/tests/integration/test_peak_memory_usage/test.py @@ -91,7 +91,7 @@ def test_clickhouse_client_max_peak_memory_usage_distributed(started_cluster): with client(name="client1>", log=client_output, command=command_text) as client1: client1.expect(prompt) client1.send( - "SELECT COUNT(*) FROM distributed_fixed_numbers JOIN fixed_numbers_2 ON distributed_fixed_numbers.number=fixed_numbers_2.number SETTINGS query_plan_join_swap_table = 'false'", + "SELECT COUNT(*) FROM distributed_fixed_numbers JOIN fixed_numbers_2 ON distributed_fixed_numbers.number=fixed_numbers_2.number SETTINGS join_algorithm='hash', query_plan_join_swap_table = 'false'", ) client1.expect("Peak memory usage", timeout=60) client1.expect(prompt) diff --git a/tests/queries/0_stateless/00225_join_duplicate_columns.sql b/tests/queries/0_stateless/00225_join_duplicate_columns.sql index 6cb4647cd14..712fae7a674 100644 --- a/tests/queries/0_stateless/00225_join_duplicate_columns.sql +++ b/tests/queries/0_stateless/00225_join_duplicate_columns.sql @@ -1,3 +1,12 @@ +-- The following queries use very weird block structure: +-- __table3.b UInt8 UInt8(size = 1), __table3.b UInt8 Const(size = 1, UInt8(size = 1)), __table3.c UInt8 Const(size = 1, UInt8(size = 1)) +-- That leads to a pretty legit error in ConcurrentHashJoin within a call to Block::cloneEmpty(): +-- Code: 352. DB::Exception: Block structure mismatch in (columns with identical name must have identical structure) stream: different columns: +-- __table3.b UInt8 UInt8(size = 0) +-- __table3.b UInt8 Const(size = 0, UInt8(size = 1)) +-- So let's disable parallel_hash. +SET join_algorithm = 'hash,grace_hash,partial_merge,full_sorting_merge'; + select b from (select 1 as a, 42 as c) js1 any left join (select 2 as b, 2 as b, 41 as c) js2 using c; select b from (select 1 as a, 42 as c) js1 any left join (select 2 as b, 2 as b, 42 as c) js2 using c;