MCPcopy Create free account
hub / github.com/bytedance/bolt / resolveScalarFunctionType

Function resolveScalarFunctionType

bolt/parse/TypeResolver.cpp:94–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94TypePtr resolveScalarFunctionType(
95 const std::string& name,
96 const std::vector<TypePtr>& argTypes,
97 bool nullOnFailure) {
98 auto returnType = resolveFunction(name, argTypes);
99 if (returnType) {
100 return returnType;
101 }
102
103 if (nullOnFailure) {
104 return nullptr;
105 }
106
107 auto allSignatures = getFunctionSignatures();
108 auto it = allSignatures.find(name);
109 if (it == allSignatures.end()) {
110 BOLT_USER_FAIL("Scalar function doesn't exist: {}.", name);
111 } else {
112 const auto& functionSignatures = it->second;
113 BOLT_USER_FAIL(
114 "Scalar function signature is not supported: {}. Supported signatures: {}.",
115 toString(name, argTypes),
116 toString(functionSignatures));
117 }
118}
119} // namespace bytedance::bolt::parse

Callers 3

resolveAggregateTypeFunction · 0.85
resolveTypeFunction · 0.85
callMethod · 0.85

Calls 5

resolveFunctionFunction · 0.85
getFunctionSignaturesFunction · 0.85
toStringFunction · 0.70
findMethod · 0.45
endMethod · 0.45

Tested by 2

resolveAggregateTypeFunction · 0.68
callMethod · 0.68