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

Method Ingest_some_nulls

r/src/array_to_vector.cpp:557–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555 }
556
557 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
558 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
559 const FixedSizeBinaryArray* binary_array =
560 checked_cast<const FixedSizeBinaryArray*>(array.get());
561
562 int byte_width = binary_array->byte_width();
563 auto ingest_one = [&, byte_width](R_xlen_t i) {
564 auto value = binary_array->GetValue(i);
565 SEXP raw = PROTECT(Rf_allocVector(RAWSXP, byte_width));
566 std::copy(value, value + byte_width, RAW(raw));
567
568 SET_VECTOR_ELT(data, i + start, raw);
569 UNPROTECT(1);
570
571 return Status::OK();
572 };
573
574 return IngestSome(array, n, ingest_one);
575 }
576
577 virtual bool Parallel() const { return false; }
578

Callers

nothing calls this directly

Calls 5

IngestSomeFunction · 0.85
OKFunction · 0.50
getMethod · 0.45
byte_widthMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected