mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix assert cast in join on falsy condition
This commit is contained in:
parent
cf6442fa65
commit
597544a15b
@ -232,6 +232,11 @@ HashJoin::HashJoin(std::shared_ptr<TableJoin> table_join_, const Block & right_s
|
||||
data->type = Type::CROSS;
|
||||
sample_block_with_columns_to_add = right_sample_block;
|
||||
}
|
||||
else if (table_join->getClauses().empty())
|
||||
{
|
||||
data->type = Type::EMPTY;
|
||||
sample_block_with_columns_to_add = right_sample_block;
|
||||
}
|
||||
else if (table_join->oneDisjunct())
|
||||
{
|
||||
const auto & key_names_right = table_join->getOnlyClause().key_names_right;
|
||||
|
@ -0,0 +1,2 @@
|
||||
1 0
|
||||
\N 1
|
12
tests/queries/0_stateless/02461_join_lc_issue_42380.sql
Normal file
12
tests/queries/0_stateless/02461_join_lc_issue_42380.sql
Normal file
@ -0,0 +1,12 @@
|
||||
DROP TABLE IF EXISTS t1__fuzz_13;
|
||||
DROP TABLE IF EXISTS t2__fuzz_47;
|
||||
|
||||
SET allow_suspicious_low_cardinality_types = 1;
|
||||
|
||||
CREATE TABLE t1__fuzz_13 (id Nullable(Int16)) ENGINE = MergeTree() ORDER BY id SETTINGS allow_nullable_key = 1;
|
||||
CREATE TABLE t2__fuzz_47 (id LowCardinality(Int16)) ENGINE = MergeTree() ORDER BY id;
|
||||
|
||||
INSERT INTO t1__fuzz_13 VALUES (1);
|
||||
INSERT INTO t2__fuzz_47 VALUES (1);
|
||||
|
||||
SELECT * FROM t1__fuzz_13 FULL OUTER JOIN t2__fuzz_47 ON 1 = 2;
|
Loading…
Reference in New Issue
Block a user