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

Function IndicesNonZeroExecChunked

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

Source from the content-addressed store, hash-verified

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