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

Function IndicesNonZeroExecChunked

cpp/src/arrow/compute/kernels/vector_selection.cc:281–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281Status IndicesNonZeroExecChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
282 const ChunkedArray& arr = *batch[0].chunked_array();
283 std::vector<ArraySpan> arrays;
284 for (int i = 0; i < arr.num_chunks(); ++i) {
285 arrays.push_back(ArraySpan(*arr.chunk(i)->data()));
286 }
287 std::shared_ptr<ArrayData> result;
288 RETURN_NOT_OK(DoNonZero(arrays, arr.length(), &result));
289 out->value = std::move(result);
290 return Status::OK();
291}
292
293std::shared_ptr<VectorFunction> MakeIndicesNonZeroFunction(std::string name,
294 FunctionDoc doc) {

Callers

nothing calls this directly

Calls 8

DoNonZeroFunction · 0.85
chunked_arrayMethod · 0.80
push_backMethod · 0.80
ArraySpanFunction · 0.50
OKFunction · 0.50
num_chunksMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected