| 1105 | } |
| 1106 | |
| 1107 | Status DoSelectK(const std::shared_ptr<Schema>& schm, |
| 1108 | const std::vector<std::string>& input_json, |
| 1109 | const SelectKOptions& options, std::shared_ptr<Table>* out) { |
| 1110 | auto table = TableFromJSON(schm, input_json); |
| 1111 | ARROW_ASSIGN_OR_RAISE(auto indices, SelectKUnstable(Datum(*table), options)); |
| 1112 | ValidateOutput(*indices); |
| 1113 | |
| 1114 | ARROW_ASSIGN_OR_RAISE( |
| 1115 | auto select_k, Take(Datum(table), Datum(indices), TakeOptions::NoBoundsCheck())); |
| 1116 | *out = select_k.table(); |
| 1117 | return Status::OK(); |
| 1118 | } |
| 1119 | }; |
| 1120 | |
| 1121 | TEST_F(TestSelectKWithTable, EmptyTable) { |
no test coverage detected