| 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 | |
| 254 | TEST_F(TestSelectKWithArray, PartialSelectKNull) { |
no test coverage detected