| 67 | } |
| 68 | |
| 69 | TypePtr resolveType( |
| 70 | const std::vector<std::shared_ptr<const core::ITypedExpr>>& inputs, |
| 71 | const std::shared_ptr<const core::CallExpr>& expr, |
| 72 | bool nullOnFailure) { |
| 73 | std::vector<TypePtr> inputTypes; |
| 74 | inputTypes.reserve(inputs.size()); |
| 75 | for (auto& input : inputs) { |
| 76 | inputTypes.emplace_back(input->type()); |
| 77 | } |
| 78 | |
| 79 | if (auto resolvedType = exec::resolveTypeForSpecialForm( |
| 80 | expr->getFunctionName(), inputTypes)) { |
| 81 | return resolvedType; |
| 82 | } |
| 83 | |
| 84 | return resolveScalarFunctionType( |
| 85 | expr->getFunctionName(), inputTypes, nullOnFailure); |
| 86 | } |
| 87 | |
| 88 | } // namespace |
| 89 | |