| 37 | namespace bytedance::bolt::exec { |
| 38 | |
| 39 | std::pair<TypePtr, TypePtr> resolveAggregateFunction( |
| 40 | const std::string& functionName, |
| 41 | const std::vector<TypePtr>& argTypes) { |
| 42 | if (auto aggregateFunctionSignatures = |
| 43 | getAggregateFunctionSignatures(functionName)) { |
| 44 | for (const auto& signature : aggregateFunctionSignatures.value()) { |
| 45 | SignatureBinder binder(*signature, argTypes); |
| 46 | if (binder.tryBind()) { |
| 47 | return std::make_pair( |
| 48 | binder.tryResolveReturnType(), |
| 49 | binder.tryResolveType(signature->intermediateType())); |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | return std::make_pair(nullptr, nullptr); |
| 55 | } |
| 56 | |
| 57 | } // namespace bytedance::bolt::exec |