Fix typos

This commit is contained in:
Igor Nikonov 2022-09-12 21:11:05 +00:00
parent 7502be3b75
commit 1c9c303cce

View File

@ -54,7 +54,7 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node, QueryPlan::Nodes &)
const SortDescription & sort_desc = output.sort_description;
const auto & distinct_columns = pre_distinct->getOutputStream().header.getNames();
/// apply optimization only when distinct columns match or form prefix of sorting key
/// todo: check if reading in order optimization would be benefitial sorting key is prefix of columns in DISTINCT
/// todo: check if reading in order optimization would be beneficial if sorting key is prefix of columns in DISTINCT
if (sort_desc.size() < distinct_columns.size())
return 0;
@ -71,8 +71,6 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node, QueryPlan::Nodes &)
if (distinct_sort_desc.empty())
return 0;
LOG_ERROR(&Poco::Logger::get("DistinctOptimization"), "DISTINCT sort description: {}", dumpSortDescription(distinct_sort_desc));
InputOrderInfoPtr order_info
= std::make_shared<const InputOrderInfo>(distinct_sort_desc, distinct_sort_desc.size(), 1, pre_distinct->getLimitHint());
read_from_merge_tree->setQueryInfoInputOrderInfo(order_info);