Simplification of aggregate functions: compatibility details [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-12-21 04:43:00 +03:00 committed by alexey-milovidov
parent ef6d3be53a
commit bf9c301784
2 changed files with 2 additions and 3 deletions

View File

@ -37,8 +37,7 @@ AggregateFunctionPtr createAggregateFunctionSumMap(const std::string & name, con
values_types.push_back(array_type->getNestedType());
}
return AggregateFunctionPtr(createWithNumericType<AggregateFunctionSumMap>(*array_type->getNestedType(),
std::move(keys_type), std::move(values_types)));
return AggregateFunctionPtr(createWithNumericType<AggregateFunctionSumMap>(*keys_type, keys_type, std::move(values_types)));
}
}

View File

@ -488,7 +488,7 @@ void SummingSortedBlockInputStream::addRow(SortCursor & cursor)
for (size_t i = 0; i < desc.column_numbers.size(); ++i)
columns[i] = cursor->all_columns[desc.column_numbers[i]];
desc.add_function(desc.function.get(),desc.state.data(), columns.data(), cursor->pos, nullptr);
desc.add_function(desc.function.get(), desc.state.data(), columns.data(), cursor->pos, nullptr);
}
}
}