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

Function registerVectorFunction

bolt/expression/VectorFunction.cpp:144–157  ·  view source on GitHub ↗

Returns true iff an insertion actually happened

Source from the content-addressed store, hash-verified

142
143// Returns true iff an insertion actually happened
144bool registerVectorFunction(
145 const std::string& name,
146 std::vector<FunctionSignaturePtr> signatures,
147 std::unique_ptr<VectorFunction> func,
148 VectorFunctionMetadata metadata,
149 bool overwrite) {
150 std::shared_ptr<VectorFunction> sharedFunc = std::move(func);
151 auto factory = [sharedFunc](
152 const auto& /*name*/,
153 const auto& /*vectorArg*/,
154 const auto& /*config*/) { return sharedFunc; };
155 return registerStatefulVectorFunction(
156 name, signatures, factory, metadata, overwrite);
157}
158
159bool deregisterVectorFunction(const std::string& name) {
160 auto sanitizedName = sanitizeName(name);

Callers 15

registerPythonFunctionFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
CastBaseTestMethod · 0.50
TEST_FFunction · 0.50
MapWriterBenchmarkMethod · 0.50

Calls 1

Tested by 9

TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
CastBaseTestMethod · 0.40
TEST_FFunction · 0.40
InTestMethod · 0.40