| 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 |
nothing calls this directly
no test coverage detected