Skip to content

Commit

Permalink
JOIN filter push down right stream filled crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kitaisreal committed Apr 14, 2024
1 parent b6cfba3 commit e2ff2f8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Processors/QueryPlan/Optimizations/filterPushDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static size_t tryPushDownOverJoinStep(QueryPlan::Node * parent_node, QueryPlan::
JoinKind::Left);
}

if (join_filter_push_down_actions.right_stream_filter_to_push_down)
if (join_filter_push_down_actions.right_stream_filter_to_push_down && allow_push_down_to_right)
{
updated_steps += addNewFilterStepOrThrow(parent_node,
nodes,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
DROP TABLE IF EXISTS t1__fuzz_0;
CREATE TABLE t1__fuzz_0
(
`x` UInt8,
`str` String
)
ENGINE = MergeTree ORDER BY x;

INSERT INTO t1__fuzz_0 SELECT number, toString(number) FROM numbers(10);

DROP TABLE IF EXISTS left_join__fuzz_2;
CREATE TABLE left_join__fuzz_2
(
`x` UInt32,
`s` LowCardinality(String)
) ENGINE = Join(`ALL`, LEFT, x);

INSERT INTO left_join__fuzz_2 SELECT number, toString(number) FROM numbers(10);

SELECT 14 FROM t1__fuzz_0 LEFT JOIN left_join__fuzz_2 USING (x)
WHERE pointInPolygon(materialize((-inf, 1023)), [(5, 0.9998999834060669), (1.1920928955078125e-7, 100.0000991821289), (1.000100016593933, 100.0000991821289)])
ORDER BY toNullable('202.79.32.10') DESC NULLS LAST, toNullable(toLowCardinality(toUInt256(14))) ASC, x DESC NULLS LAST;

DROP TABLE t1__fuzz_0;
DROP TABLE left_join__fuzz_2;

0 comments on commit e2ff2f8

Please sign in to comment.