2011-09-19 03:40:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Poco/RegularExpression.h>
|
|
|
|
|
|
|
|
#include <DB/AggregateFunctions/IAggregateFunction.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/** Позволяет создать агрегатную функцию по её имени.
|
|
|
|
*/
|
|
|
|
class AggregateFunctionFactory
|
|
|
|
{
|
2015-04-24 15:49:30 +00:00
|
|
|
public:
|
|
|
|
using FunctionNames = std::vector<std::string>;
|
|
|
|
|
2011-09-19 03:40:05 +00:00
|
|
|
public:
|
|
|
|
AggregateFunctionFactory();
|
2013-09-14 22:56:11 +00:00
|
|
|
AggregateFunctionPtr get(const String & name, const DataTypes & argument_types, int recursion_level = 0) const;
|
2011-09-25 05:07:47 +00:00
|
|
|
AggregateFunctionPtr tryGet(const String & name, const DataTypes & argument_types) const;
|
2015-04-24 15:49:30 +00:00
|
|
|
const FunctionNames & getFunctionNames() const;
|
2013-09-14 22:56:11 +00:00
|
|
|
bool isAggregateFunctionName(const String & name, int recursion_level = 0) const;
|
2011-09-19 03:40:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|