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

Function TopKDefault

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

Source from the content-addressed store, hash-verified

177 static SelectKOptions Defaults() { return SelectKOptions(); }
178
179 static SelectKOptions TopKDefault(int64_t k, std::vector<std::string> key_names = {}) {
180 std::vector<SortKey> keys;
181 for (const auto& name : key_names) {
182 keys.emplace_back(SortKey(name, SortOrder::Descending));
183 }
184 if (key_names.empty()) {
185 keys.emplace_back(SortKey("not-used", SortOrder::Descending));
186 }
187 return SelectKOptions{k, keys};
188 }
189 static SelectKOptions BottomKDefault(int64_t k,
190 std::vector<std::string> key_names = {}) {
191 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