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

Method Ingest_some_nulls

r/src/array_to_vector.cpp:518–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516 }
517
518 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
519 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
520 const FixedSizeBinaryArray* binary_array =
521 checked_cast<const FixedSizeBinaryArray*>(array.get());
522
523 int byte_width = binary_array->byte_width();
524 auto ingest_one = [&, byte_width](R_xlen_t i) {
525 auto value = binary_array->GetValue(i);
526 SEXP raw = PROTECT(Rf_allocVector(RAWSXP, byte_width));
527 std::copy(value, value + byte_width, RAW(raw));
528
529 SET_VECTOR_ELT(data, i + start, raw);
530 UNPROTECT(1);
531
532 return Status::OK();
533 };
534
535 return IngestSome(array, n, ingest_one);
536 }
537
538 virtual bool Parallel() const { return false; }
539

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