MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / resolveAggregateFunction

Function resolveAggregateFunction

src/Analyzer/Utils.cpp:850–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848};
849
850inline AggregateFunctionPtr resolveAggregateFunction(FunctionNode & function_node, const String & function_name)
851{
852 Array parameters;
853 for (const auto & param : function_node.getParameters())
854 {
855 auto * constant = param->as<ConstantNode>();
856 parameters.push_back(constant->getValue());
857 }
858
859 const auto & function_node_argument_nodes = function_node.getArguments().getNodes();
860
861 DataTypes argument_types;
862 argument_types.reserve(function_node_argument_nodes.size());
863
864 for (const auto & function_node_argument : function_node_argument_nodes)
865 argument_types.emplace_back(function_node_argument->getResultType());
866
867 AggregateFunctionProperties properties;
868 auto action = NullsAction::EMPTY;
869 return AggregateFunctionFactory::instance().get(function_name, action, argument_types, parameters, properties);
870}
871
872}
873

Callers 8

rerunFunctionResolveFunction · 0.85
getReturnTypeImplMethod · 0.85
buildImplMethod · 0.85
getReturnTypeImplMethod · 0.85
buildImplMethod · 0.85
getReturnTypeImplMethod · 0.85
buildImplMethod · 0.85

Calls 10

getNodesMethod · 0.80
getParametersMethod · 0.45
push_backMethod · 0.45
getValueMethod · 0.45
getArgumentsMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45
getResultTypeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected