fix 'ORDER BY WITH FILL' over const columns

This commit is contained in:
Anton Popov 2020-06-16 05:55:27 +03:00
parent d6e69211b1
commit 03058c3c25
3 changed files with 29 additions and 2 deletions

View File

@ -107,8 +107,9 @@ void FillingTransform::transform(Chunk & chunk)
{
for (size_t pos : positions)
{
new_columns.push_back(old_columns[pos]);
new_mutable_columns.push_back(old_columns[pos]->cloneEmpty()->assumeMutable());
auto old_column = old_columns[pos]->convertToFullColumnIfConst();
new_columns.push_back(old_column);
new_mutable_columns.push_back(old_column->cloneEmpty()->assumeMutable());
}
};

View File

@ -0,0 +1,20 @@
2020-06-16 00:00:00
2020-06-16 00:30:00
2020-06-16 01:00:00
2020-06-16 01:30:00
2020-06-16 02:00:00
2020-06-16 02:30:00
2020-06-16 03:00:00
2020-06-16 03:30:00
2020-06-16 04:00:00
2020-06-16 04:30:00
2020-06-16 05:00:00
2020-06-16 05:30:00
2020-06-16 06:00:00
2020-06-16 06:30:00
2020-06-16 07:00:00
2020-06-16 07:30:00
2020-06-16 08:00:00
2020-06-16 08:30:00
2020-06-16 09:00:00
2020-06-16 09:30:00

View File

@ -0,0 +1,6 @@
WITH toDateTime('2020-06-16 03:00:00') AS date_time
SELECT date_time ORDER BY date_time ASC
WITH FILL
FROM toDateTime('2020-06-16 00:00:00')
TO toDateTime('2020-06-16 10:00:00')
STEP 1800;