MCPcopy Create free account
hub / github.com/apache/arrow / TopKDefault

Function TopKDefault

cpp/src/arrow/compute/api_vector.h:164–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 static SelectKOptions Defaults() { return SelectKOptions(); }
163
164 static SelectKOptions TopKDefault(int64_t k, std::vector<std::string> key_names = {}) {
165 std::vector<SortKey> keys;
166 for (const auto& name : key_names) {
167 keys.emplace_back(SortKey(name, SortOrder::Descending));
168 }
169 if (key_names.empty()) {
170 keys.emplace_back(SortKey("not-used", SortOrder::Descending));
171 }
172 return SelectKOptions{k, keys};
173 }
174 static SelectKOptions BottomKDefault(int64_t k,
175 std::vector<std::string> key_names = {}) {
176 std::vector<SortKey> keys;

Callers 5

TESTFunction · 0.85
SelectKFunction · 0.85
TEST_FFunction · 0.85
SelectKBenchmarkFunction · 0.85
SourceKSelectExampleFunction · 0.85

Calls 3

emplace_backMethod · 0.80
SortKeyClass · 0.50
emptyMethod · 0.45

Tested by 3

TESTFunction · 0.68
SelectKFunction · 0.68
TEST_FFunction · 0.68