mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
0bf6b61b59
Previously sort order of the std::unordered_map in libstdc++ was different and any *SimpleState() reports an error that function does not exists. Fix this by using proper order in container, and use std::vector over std::unordered_map, since there linear traversing anyway in the single method -- tryFindSuffix() Note that test is not required, since it either fail with unknown function or not.
26 lines
803 B
C++
26 lines
803 B
C++
#include <AggregateFunctions/AggregateFunctionCombinatorFactory.h>
|
|
#include <Storages/System/StorageSystemAggregateFunctionCombinators.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
NamesAndTypesList StorageSystemAggregateFunctionCombinators::getNamesAndTypes()
|
|
{
|
|
return {
|
|
{"name", std::make_shared<DataTypeString>()},
|
|
{"is_internal", std::make_shared<DataTypeUInt8>()},
|
|
};
|
|
}
|
|
|
|
void StorageSystemAggregateFunctionCombinators::fillData(MutableColumns & res_columns, ContextPtr, const SelectQueryInfo &) const
|
|
{
|
|
const auto & combinators = AggregateFunctionCombinatorFactory::instance().getAllAggregateFunctionCombinators();
|
|
for (const auto & pair : combinators)
|
|
{
|
|
res_columns[0]->insert(pair.name);
|
|
res_columns[1]->insert(pair.combinator_ptr->isForInternalUsageOnly());
|
|
}
|
|
}
|
|
|
|
}
|