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

Function VisitNeedleRuns

cpp/src/arrow/compute/kernels/vector_search_sorted.cc:583–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581/// of logical elements.
582template <typename ArrowType, typename Visitor>
583Status VisitNeedleRuns(const Datum& needles, Visitor&& visitor) {
584 if (needles.is_scalar()) {
585 if (!needles.scalar()->is_valid) {
586 return visitor(std::optional<SearchValue<ArrowType>>{});
587 }
588 ARROW_ASSIGN_OR_RAISE(auto scalar_array, MakeArrayFromScalar(*needles.scalar(), 1));
589 return VisitArrayNeedleRuns<ArrowType>(scalar_array->data(),
590 std::forward<Visitor>(visitor));
591 }
592
593 const auto& needle_data = needles.array();
594 return VisitArrayNeedleRuns<ArrowType>(needle_data, visitor);
595}
596
597/// Build uint64 insertion-index arrays with an optional null bitmap.
598class InsertionIndexBuilder {

Callers

nothing calls this directly

Calls 4

is_scalarMethod · 0.80
scalarMethod · 0.45
dataMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected