| 1003 | } |
| 1004 | |
| 1005 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 1006 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 1007 | int multiplier = TimeUnit_multiplier(array); |
| 1008 | |
| 1009 | auto p_data = REAL(data) + start; |
| 1010 | auto p_values = array->data()->GetValues<value_type>(1); |
| 1011 | auto ingest_one = [&](R_xlen_t i) { |
| 1012 | p_data[i] = static_cast<double>(p_values[i]) / multiplier; |
| 1013 | return Status::OK(); |
| 1014 | }; |
| 1015 | auto null_one = [&](R_xlen_t i) { |
| 1016 | p_data[i] = NA_REAL; |
| 1017 | return Status::OK(); |
| 1018 | }; |
| 1019 | return IngestSome(array, n, ingest_one, null_one); |
| 1020 | } |
| 1021 | |
| 1022 | private: |
| 1023 | int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const { |
nothing calls this directly
no test coverage detected