mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
ignore empty input chunks generated by joins
This commit is contained in:
parent
fecd5f3435
commit
ce0a58f86f
@ -975,7 +975,14 @@ void WindowTransform::appendChunk(Chunk & chunk)
|
||||
// have it if it's end of data, though.
|
||||
if (!input_is_finished)
|
||||
{
|
||||
assert(chunk.hasRows());
|
||||
if (!chunk.hasRows())
|
||||
{
|
||||
// Joins may generate empty input chunks when it's not yet end of
|
||||
// input. Just ignore them. They probably shouldn't be sending empty
|
||||
// chunks up the pipeline, but oh well.
|
||||
return;
|
||||
}
|
||||
|
||||
blocks.push_back({});
|
||||
auto & block = blocks.back();
|
||||
// Use the number of rows from the Chunk, because it is correct even in
|
||||
|
@ -1108,3 +1108,8 @@ from (
|
||||
-- -INT_MIN row offset that can lead to problems with negation, found when fuzzing
|
||||
-- under UBSan. Should be limited to at most INT_MAX.
|
||||
select count() over (rows between 2147483648 preceding and 2147493648 following) from numbers(2); -- { serverError 36 }
|
||||
-- Somehow in this case WindowTransform gets empty input chunks not marked as
|
||||
-- input end, and then two (!) empty input chunks marked as input end. Whatever.
|
||||
select count() over () from (select 1 a) l inner join (select 2 a) r using a;
|
||||
-- This case works as expected, one empty input chunk marked as input end.
|
||||
select count() over () where null;
|
||||
|
@ -414,3 +414,9 @@ from (
|
||||
-- -INT_MIN row offset that can lead to problems with negation, found when fuzzing
|
||||
-- under UBSan. Should be limited to at most INT_MAX.
|
||||
select count() over (rows between 2147483648 preceding and 2147493648 following) from numbers(2); -- { serverError 36 }
|
||||
|
||||
-- Somehow in this case WindowTransform gets empty input chunks not marked as
|
||||
-- input end, and then two (!) empty input chunks marked as input end. Whatever.
|
||||
select count() over () from (select 1 a) l inner join (select 2 a) r using a;
|
||||
-- This case works as expected, one empty input chunk marked as input end.
|
||||
select count() over () where null;
|
||||
|
Loading…
Reference in New Issue
Block a user