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

Method SelectValues

cpp/src/arrow/compute/exec.cc:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150Result<ExecBatch> ExecBatch::SelectValues(const std::vector<int>& ids) const {
151 std::vector<Datum> selected_values;
152 selected_values.reserve(ids.size());
153 for (int id : ids) {
154 if (id < 0 || static_cast<size_t>(id) >= values.size()) {
155 return Status::Invalid("ExecBatch invalid value selection: ", id);
156 }
157 selected_values.push_back(values[id]);
158 }
159 return ExecBatch(std::move(selected_values), length);
160}
161
162namespace {
163

Callers

nothing calls this directly

Calls 5

push_backMethod · 0.80
ExecBatchFunction · 0.70
InvalidFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected