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

Function VisitArrayNeedleRuns

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

Source from the content-addressed store, hash-verified

565/// Visit each plain-array needle as single-element logical runs.
566template <typename ArrowType, typename Visitor>
567Status VisitArrayNeedleRuns(const std::shared_ptr<ArrayData>& needles_data,
568 Visitor&& visitor) {
569 using ArrayType = typename TypeTraits<ArrowType>::ArrayType;
570
571 auto physical_type = TypeTraits<ArrowType>::type_singleton();
572 auto physical_data = ToPhysicalData(needles_data, physical_type);
573 ArrayType array(physical_data);
574 for (int64_t index = 0; index < array.length(); ++index) {
575 RETURN_NOT_OK(visitor(ReadVisitedNeedle<ArrowType>(array, index)));
576 }
577 return Status::OK();
578}
579
580/// Visit scalar or plain-array needles through a uniform callback interface
581/// of logical elements.

Callers

nothing calls this directly

Calls 4

ToPhysicalDataFunction · 0.85
type_singletonFunction · 0.70
OKFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected