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

Method DoSelectK

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

Source from the content-addressed store, hash-verified

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
1121TEST_F(TestSelectKWithTable, EmptyTable) {

Callers 1

CheckMethod · 0.95

Calls 3

TableFromJSONFunction · 0.85
ValidateOutputFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected