diff --git a/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp b/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp index af867295521..85a926f1975 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp +++ b/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp @@ -1,6 +1,3 @@ -#include -#include - #include #include #include @@ -248,28 +245,32 @@ AggregateFunctionPtr AggregateFunctionFactory::tryGet(const String & name, const bool AggregateFunctionFactory::isAggregateFunctionName(const String & name) const { - std::set names; - - boost::assign::insert(names) - ("count") - ("any") - ("anyLast") - ("min") - ("max") - ("sum") - ("sumIf") - ("avg") - ("avgIf") - ("uniq") - ("uniqIf") - ("uniqState") - ("groupArray") - ("median") - ("quantile") - ("quantiles") - ; + static const char * names[] = + { + "count", + "any", + "anyLast", + "min", + "max", + "sum", + "sumIf", + "avg", + "avgIf", + "uniq", + "uniqIf", + "uniqState", + "groupArray", + "median", + "quantile", + "quantiles", + NULL + }; - return names.end() != names.find(name); + for (const char ** it = names; *it; ++it) + if (0 == strcmp(*it, name.data())) + return true; + + return false; }