mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
throw if sorting column not found
This commit is contained in:
parent
440e57769a
commit
698a984c07
@ -1533,6 +1533,10 @@ ActionsDAG::SplitResult ActionsDAG::splitActionsBySortingDescription(const NameS
|
|||||||
for (const auto & sort_column : sort_columns)
|
for (const auto & sort_column : sort_columns)
|
||||||
if (const auto * node = tryFindInIndex(sort_column))
|
if (const auto * node = tryFindInIndex(sort_column))
|
||||||
split_nodes.insert(node);
|
split_nodes.insert(node);
|
||||||
|
else
|
||||||
|
throw Exception(
|
||||||
|
ErrorCodes::LOGICAL_ERROR, "Sorting column {} wasn't found in the ActionsDAG's index. DAG:\n{}", sort_column, dumpDAG());
|
||||||
|
|
||||||
auto res = split(split_nodes);
|
auto res = split(split_nodes);
|
||||||
res.second->project_input = project_input;
|
res.second->project_input = project_input;
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user