This commit is contained in:
Nikita Taranov 2024-06-24 20:16:19 +01:00
parent 31eeeae4fd
commit 1ab5355365
3 changed files with 22 additions and 1 deletions

View File

@ -9,7 +9,6 @@
#include <base/defines.h> #include <base/defines.h>
#include <base/types.h> #include <base/types.h>
#include <Common/logger_useful.h>
#include <Columns/ColumnNullable.h> #include <Columns/ColumnNullable.h>
#include <Columns/ColumnsNumber.h> #include <Columns/ColumnsNumber.h>
#include <Columns/IColumn.h> #include <Columns/IColumn.h>
@ -19,6 +18,7 @@
#include <Interpreters/FullSortingMergeJoin.h> #include <Interpreters/FullSortingMergeJoin.h>
#include <Interpreters/TableJoin.h> #include <Interpreters/TableJoin.h>
#include <Parsers/ASTTablesInSelectQuery.h> #include <Parsers/ASTTablesInSelectQuery.h>
#include <Processors/Chunk.h>
#include <Processors/Transforms/MergeJoinTransform.h> #include <Processors/Transforms/MergeJoinTransform.h>
@ -260,6 +260,7 @@ void FullMergeJoinCursor::setChunk(Chunk && chunk)
return; return;
} }
convertToFullIfSparse(chunk);
current_chunk = std::move(chunk); current_chunk = std::move(chunk);
cursor = SortCursorImpl(sample_block, current_chunk.getColumns(), desc); cursor = SortCursorImpl(sample_block, current_chunk.getColumns(), desc);
} }

View File

@ -0,0 +1,10 @@
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

View File

@ -0,0 +1,10 @@
-- Tags: no-random-settings
-- https://github.com/ClickHouse/ClickHouse/issues/24395
SET allow_experimental_analyzer=1, join_algorithm = 'full_sorting_merge';
CREATE TABLE xxxx_yyy (key UInt32, key_b ALIAS key) ENGINE=MergeTree() ORDER BY key SETTINGS ratio_of_defaults_for_sparse_serialization=0.0;
INSERT INTO xxxx_yyy SELECT number FROM numbers(10);
SELECT *
FROM xxxx_yyy AS a
INNER JOIN xxxx_yyy AS b ON a.key = b.key_b;