mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
makeMaterializingDAG
This commit is contained in:
parent
3392b96cc3
commit
0400677483
@ -951,10 +951,14 @@ static ActionsDAGPtr makeMaterializingDAG(const Block & proj_header, const Block
|
||||
if (const_positions.empty())
|
||||
return nullptr;
|
||||
|
||||
ActionsDAGPtr dag = std::make_unique<ActionsDAG>(proj_header.getColumnsWithTypeAndName());
|
||||
ActionsDAGPtr dag = std::make_unique<ActionsDAG>();
|
||||
auto & outputs = dag->getOutputs();
|
||||
for (const auto & col : proj_header.getColumnsWithTypeAndName())
|
||||
outputs.push_back(&dag->addInput(col));
|
||||
|
||||
for (auto pos : const_positions)
|
||||
{
|
||||
auto & output = dag->getOutputs()[pos];
|
||||
auto & output = outputs[pos];
|
||||
output = &dag->materializeNode(*output);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user