mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
Wrap const columns in RemoteBlockInputStream.
This commit is contained in:
parent
b5c9be75c4
commit
8f55fdbd15
@ -164,7 +164,18 @@ static Block adaptBlockStructure(const Block & block, const Block & header, cons
|
||||
res.info = block.info;
|
||||
|
||||
for (const auto & elem : header)
|
||||
res.insert({ castColumn(block.getByName(elem.name), elem.type, context), elem.type, elem.name });
|
||||
{
|
||||
ColumnPtr column;
|
||||
|
||||
if (elem.column && isColumnConst(*elem.column))
|
||||
/// TODO: check that column from block contains the same value.
|
||||
/// TODO: serialize const columns.
|
||||
column = elem.column->cloneResized(block.rows());
|
||||
else
|
||||
column = castColumn(block.getByName(elem.name), elem.type, context);
|
||||
|
||||
res.insert({column, elem.type, elem.name});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user