mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #11697 from CurtizJ/fix-with-fill
Fix 'ORDER BY ... WITH FILL' over const columns.
This commit is contained in:
commit
c9924b8aa1
@ -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