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

Function getSortedScalarNames

bolt/functions/CoverageUtil.cpp:314–333  ·  view source on GitHub ↗

Returns alphabetically sorted list of scalar functions available in Bolt, excluding companion functions.

Source from the content-addressed store, hash-verified

312/// Returns alphabetically sorted list of scalar functions available in Bolt,
313/// excluding companion functions.
314std::vector<std::string> getSortedScalarNames() {
315 // Do not print "internal" functions.
316 static const std::unordered_set<std::string> kBlockList = {"row_constructor"};
317
318 auto functions = getFunctionSignatures();
319
320 std::vector<std::string> names;
321 names.reserve(functions.size());
322 exec::aggregateFunctions().withRLock([&](const auto& aggregateFunctions) {
323 for (const auto& func : functions) {
324 const auto& name = func.first;
325 if (!isCompanionFunctionName(name, aggregateFunctions) &&
326 kBlockList.count(name) == 0) {
327 names.emplace_back(name);
328 }
329 }
330 });
331 std::sort(names.begin(), names.end());
332 return names;
333}
334
335/// Returns alphabetically sorted list of aggregate functions available in
336/// Bolt, excluding compaion functions.

Callers 1

printBoltFunctionsFunction · 0.85

Calls 7

getFunctionSignaturesFunction · 0.85
isCompanionFunctionNameFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected