| 848 | }; |
| 849 | |
| 850 | inline 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 |
no test coverage detected