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