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

Function getSortedWindowNames

bolt/functions/CoverageUtil.cpp:353–368  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

351/// Returns alphabetically sorted list of window functions available in Bolt,
352/// excluding companion functions.
353std::vector<std::string> getSortedWindowNames() {
354 const auto& functions = exec::windowFunctions();
355
356 std::vector<std::string> names;
357 names.reserve(functions.size());
358 exec::aggregateFunctions().withRLock([&](const auto& aggregateFunctions) {
359 for (const auto& entry : functions) {
360 if (!isCompanionFunctionName(entry.first, aggregateFunctions) &&
361 aggregateFunctions.count(entry.first) == 0) {
362 names.emplace_back(entry.first);
363 }
364 }
365 });
366 std::sort(names.begin(), names.end());
367 return names;
368}
369
370/// Takes a super-set of simple, vector and aggregate function names and prints
371/// coverage map showing which of these functions are available in Bolt.

Callers 1

printBoltFunctionsFunction · 0.85

Calls 6

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

Tested by

no test coverage detected