mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
fix 'ORDER BY WITH FILL' over const columns
This commit is contained in:
parent
d6e69211b1
commit
03058c3c25
@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
|
20
tests/queries/0_stateless/01145_with_fill_const.reference
Normal file
20
tests/queries/0_stateless/01145_with_fill_const.reference
Normal 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
|
6
tests/queries/0_stateless/01145_with_fill_const.sql
Normal file
6
tests/queries/0_stateless/01145_with_fill_const.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user