mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-27 20:20:49 +00:00
Fix ActionsDAG::removeUnusedResult
This commit is contained in:
parent
683d793cc2
commit
bbed905461
@ -490,6 +490,11 @@ bool ActionsDAG::removeUnusedResult(const std::string & column_name)
|
|||||||
if (col == child)
|
if (col == child)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/// Do not remove input if it was mentioned in index several times.
|
||||||
|
for (const auto * node : index)
|
||||||
|
if (col == node)
|
||||||
|
return false;
|
||||||
|
|
||||||
/// Remove from nodes and inputs.
|
/// Remove from nodes and inputs.
|
||||||
for (auto jt = nodes.begin(); jt != nodes.end(); ++jt)
|
for (auto jt = nodes.begin(); jt != nodes.end(); ++jt)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user