| 254 | } |
| 255 | |
| 256 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 257 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 258 | auto p_values = array->data()->GetValues<int>(1); |
| 259 | if (!p_values) { |
| 260 | return Status::Invalid("Invalid data buffer"); |
| 261 | } |
| 262 | auto p_data = REAL(data) + start; |
| 263 | auto ingest_one = [&](R_xlen_t i) { |
| 264 | p_data[i] = static_cast<double>(p_values[i]); |
| 265 | return Status::OK(); |
| 266 | }; |
| 267 | auto null_one = [&](R_xlen_t i) { |
| 268 | p_data[i] = NA_REAL; |
| 269 | return Status::OK(); |
| 270 | }; |
| 271 | |
| 272 | return IngestSome(array, n, ingest_one, null_one); |
| 273 | } |
| 274 | }; |
| 275 | |
| 276 | template <typename StringArrayType> |
nothing calls this directly
no test coverage detected