JOIN filter push down right stream filled crash fix

This commit is contained in:
Maksim Kita 2024-04-14 10:55:52 +03:00
parent b6cfba33f1
commit e2ff2f8a1f
3 changed files with 26 additions and 1 deletions

View File

@ -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,

View File

@ -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;