mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Fix logical error in ANTI join with NULL
This commit is contained in:
parent
4b02d83999
commit
f1d6954637
@ -1383,6 +1383,9 @@ NO_INLINE IColumn::Filter joinRightColumns(
|
||||
{
|
||||
if (!right_row_found && null_element_found)
|
||||
{
|
||||
if constexpr (join_features.is_anti_join && join_features.left)
|
||||
setUsed<need_filter>(filter, i);
|
||||
|
||||
addNotFoundRow<join_features.add_missing, join_features.need_replication>(added_columns, current_offset);
|
||||
|
||||
if constexpr (join_features.need_replication)
|
||||
|
@ -11,7 +11,9 @@
|
||||
0 0
|
||||
0 0
|
||||
0 1
|
||||
\N 0
|
||||
0 1
|
||||
\N 0
|
||||
0 0
|
||||
0 0
|
||||
0 \N
|
||||
@ -25,7 +27,9 @@
|
||||
0 0
|
||||
0 0
|
||||
0 2
|
||||
\N 1
|
||||
0 2
|
||||
\N 1
|
||||
0 \N
|
||||
0 0
|
||||
0 \N
|
||||
@ -39,7 +43,9 @@
|
||||
0 \N
|
||||
0 \N
|
||||
0 1
|
||||
\N \N
|
||||
0 1
|
||||
\N \N
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
@ -53,7 +59,9 @@
|
||||
0 0
|
||||
0 0
|
||||
\N 2
|
||||
\N 1
|
||||
\N 2
|
||||
\N 1
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
@ -67,7 +75,9 @@
|
||||
0 0
|
||||
0 0
|
||||
0 1
|
||||
\N 0
|
||||
0 1
|
||||
\N 0
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
@ -81,7 +91,9 @@
|
||||
0 0
|
||||
0 0
|
||||
1 2
|
||||
\N 1
|
||||
1 2
|
||||
\N 1
|
||||
0 \N
|
||||
0 0
|
||||
0 0
|
||||
@ -95,7 +107,9 @@
|
||||
0 \N
|
||||
0 \N
|
||||
0 1
|
||||
\N \N
|
||||
0 1
|
||||
\N \N
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
@ -109,4 +123,6 @@
|
||||
0 0
|
||||
0 0
|
||||
1 2
|
||||
\N 1
|
||||
1 2
|
||||
\N 1
|
||||
|
@ -44,6 +44,12 @@ SELECT id > 1, d.idd FROM (SELECT {{ maybe_materialize }}(toLowCardinality(0)) A
|
||||
ON a.id = d.idd
|
||||
;
|
||||
|
||||
SELECT *
|
||||
FROM (SELECT {{ maybe_materialize }}(NULL :: Nullable(UInt64)) AS id) AS a
|
||||
{{ strictness }} {{ kind }} JOIN (SELECT {{ maybe_materialize }}(1 :: UInt32) AS id) AS d
|
||||
ON a.id = d.id
|
||||
;
|
||||
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
|
Loading…
Reference in New Issue
Block a user