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

Method DoSelectK

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

Source from the content-addressed store, hash-verified

239 }
240
241 Status DoSelectK(const std::shared_ptr<DataType>& type, const std::string& array_json,
242 const SelectKOptions& options, std::shared_ptr<Array>* out) {
243 auto array = ArrayFromJSON(type, array_json);
244 ARROW_ASSIGN_OR_RAISE(auto indices, SelectKUnstable(Datum(*array), options));
245
246 ValidateOutput(*indices);
247 ARROW_ASSIGN_OR_RAISE(
248 auto select_k, Take(Datum(array), Datum(indices), TakeOptions::NoBoundsCheck()));
249 *out = select_k.make_array();
250 return Status::OK();
251 }
252};
253
254TEST_F(TestSelectKWithArray, PartialSelectKNull) {

Callers 1

CheckMethod · 0.95

Calls 4

ArrayFromJSONFunction · 0.85
ValidateOutputFunction · 0.85
make_arrayMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected