mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
result columns should take precedence to account same name aliasing
This commit is contained in:
parent
7ad8ea78bb
commit
25316a29f3
@ -1193,12 +1193,12 @@ static InterpolateDescriptionPtr getInterpolateDescription(
|
||||
}
|
||||
|
||||
col_set.clear();
|
||||
for (const auto & column : source_block)
|
||||
for (const auto & column : result_block)
|
||||
{
|
||||
source_columns.emplace_back(column.name, column.type);
|
||||
col_set.insert(column.name);
|
||||
}
|
||||
for (const auto & column : result_block)
|
||||
for (const auto & column : source_block)
|
||||
if (!col_set.contains(column.name))
|
||||
source_columns.emplace_back(column.name, column.type);
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
2023-05-15 1
|
||||
2023-05-16 1
|
||||
2023-05-17 1
|
||||
2023-05-18 1
|
||||
2023-05-19 1
|
||||
2023-05-20 1
|
||||
2023-05-21 1
|
||||
2023-05-22 15
|
@ -0,0 +1,8 @@
|
||||
DROP TABLE IF EXISTS 02861_interpolate;
|
||||
|
||||
CREATE TABLE 02861_interpolate (date Date, id String, f Int16) ENGINE=MergeTree() ORDER BY (date);
|
||||
INSERT INTO 02861_interpolate VALUES ('2023-05-15', '1', 1), ('2023-05-22', '1', 15);
|
||||
|
||||
SELECT date AS d, toNullable(f) AS f FROM 02861_interpolate WHERE id = '1' ORDER BY d ASC WITH FILL STEP toIntervalDay(1) INTERPOLATE (f);
|
||||
|
||||
DROP TABLE 02861_interpolate;
|
Loading…
Reference in New Issue
Block a user