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

Function SelectK

cpp/src/arrow/compute/kernels/select_k_test.cc:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56template <SortOrder order>
57Result<std::shared_ptr<Array>> SelectK(const Datum& values, int64_t k) {
58 if (order == SortOrder::Descending) {
59 return SelectKUnstable(values, SelectKOptions::TopKDefault(k));
60 } else {
61 return SelectKUnstable(values, SelectKOptions::BottomKDefault(k));
62 }
63}
64
65void ValidateSelectK(const Datum& datum, Array& select_k_indices, SortOrder order) {
66 ASSERT_TRUE(datum.is_arraylike());

Callers

nothing calls this directly

Calls 2

TopKDefaultFunction · 0.85
BottomKDefaultFunction · 0.85

Tested by

no test coverage detected