This commit is contained in:
Dmitry 2020-02-14 16:31:01 +03:00
parent 76e9a8edfd
commit 4bcf10b5a5
3 changed files with 25 additions and 25 deletions

View File

@ -1910,15 +1910,15 @@ void InterpreterSelectQuery::executeAggregation(Pipeline & pipeline, const Expre
const Settings & settings = context->getSettingsRef();
if (group_by_info) {
if (group_by_info)
{
/// TODO optimization :)
// for (const auto & elem : group_by_info->order_key_prefix_descr) {
// for (const auto & elem : group_by_info->order_key_prefix_descr)
// std::cerr << elem << " ";
// }
// std::cerr << "\n";
}
/** Two-level aggregation is useful in two cases:
* 1. Parallel aggregation is done, and the results should be merged in parallel.
* 2. An aggregation is done with store of temporary data on the disk, and they need to be merged in a memory efficient way.

View File

@ -136,10 +136,10 @@ GroupByInfoPtr AggregateInOrderOptimizer::getGroupByCommonPrefix(const StoragePt
if (forbidden_columns.count(group_by_description[i]))
break;
if (group_by_description[i] == sorting_key_columns[i]) {
if (group_by_description[i] == sorting_key_columns[i])
group_by_common_prefix.push_back(group_by_description[i]);
}
else {
else
{
/// TODO injective functions
break;
}