| 909 | } |
| 910 | |
| 911 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 912 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 913 | int multiplier = TimeUnit_multiplier(array); |
| 914 | |
| 915 | auto p_data = REAL(data) + start; |
| 916 | auto p_values = array->data()->GetValues<value_type>(1); |
| 917 | auto ingest_one = [&](R_xlen_t i) { |
| 918 | p_data[i] = static_cast<double>(p_values[i]) / multiplier; |
| 919 | return Status::OK(); |
| 920 | }; |
| 921 | auto null_one = [&](R_xlen_t i) { |
| 922 | p_data[i] = NA_REAL; |
| 923 | return Status::OK(); |
| 924 | }; |
| 925 | return IngestSome(array, n, ingest_one, null_one); |
| 926 | } |
| 927 | |
| 928 | private: |
| 929 | int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const { |
nothing calls this directly
no test coverage detected