| 293 | } |
| 294 | |
| 295 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 296 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 297 | auto p_values = array->data()->GetValues<int>(1); |
| 298 | if (!p_values) { |
| 299 | return Status::Invalid("Invalid data buffer"); |
| 300 | } |
| 301 | auto p_data = REAL(data) + start; |
| 302 | auto ingest_one = [&](R_xlen_t i) { |
| 303 | p_data[i] = static_cast<double>(p_values[i]); |
| 304 | return Status::OK(); |
| 305 | }; |
| 306 | auto null_one = [&](R_xlen_t i) { |
| 307 | p_data[i] = NA_REAL; |
| 308 | return Status::OK(); |
| 309 | }; |
| 310 | |
| 311 | return IngestSome(array, n, ingest_one, null_one); |
| 312 | } |
| 313 | }; |
| 314 | |
| 315 | template <typename StringArrayType> |
nothing calls this directly
no test coverage detected