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

Function registerDummyAggregateFunction

bolt/exec/tests/DummyAggregateFunction.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace bytedance::bolt::exec::test {
33
34AggregateRegistrationResult registerDummyAggregateFunction(
35 const std::string& name,
36 const std::vector<AggregateFunctionSignaturePtr>& signatures,
37 bool overwrite) {
38 return registerAggregateFunction(
39 name,
40 signatures,
41 [&](core::AggregationNode::Step step,
42 const std::vector<TypePtr>& argTypes,
43 const TypePtr& resultType,
44 const core::QueryConfig&
45 /*config*/) -> std::unique_ptr<exec::Aggregate> {
46 BOLT_CHECK_GE(argTypes.size(), 1);
47 if (isPartialOutput(step)) {
48 return std::make_unique<DummyDicitonaryFunction>(argTypes[0]);
49 }
50 return std::make_unique<DummyDicitonaryFunction>(resultType);
51 },
52 /*registerCompanionFunctions*/ true,
53 overwrite);
54}
55
56} // namespace bytedance::bolt::exec::test

Callers 2

TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls 3

isPartialOutputFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected