Merge pull request #46897 from ClickHouse/fix-fill-empty-block

Fix - WITH FILL would produce abort when FillingTransform processing empty block
This commit is contained in:
Alexey Milovidov 2023-02-26 22:30:50 +03:00 committed by GitHub
commit df5c7c98e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -269,6 +269,9 @@ void FillingTransform::transform(Chunk & chunk)
if (on_totals)
return;
if (!chunk.hasRows() && !generate_suffix)
return;
Columns old_fill_columns;
Columns old_interpolate_columns;
Columns old_other_columns;

View File

@ -0,0 +1,11 @@
1 \N
2 \N
2 \N
2 \N
3 \N
4 \N
5 \N
6 \N
7 \N
8 \N
9 \N

View File

@ -0,0 +1,10 @@
-- this SELECT produces empty chunk in FillingTransform
SELECT
2 AS x,
arrayJoin([NULL, NULL, NULL])
GROUP BY
GROUPING SETS (
(0),
([NULL, NULL, NULL]))
ORDER BY x ASC WITH FILL FROM 1 TO 10;