| 876 | } |
| 877 | |
| 878 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 879 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 880 | int multiplier = TimeUnit_multiplier(array); |
| 881 | |
| 882 | auto p_data = REAL(data) + start; |
| 883 | auto p_values = array->data()->GetValues<value_type>(1); |
| 884 | auto ingest_one = [&](R_xlen_t i) { |
| 885 | p_data[i] = static_cast<double>(p_values[i]) / multiplier; |
| 886 | return Status::OK(); |
| 887 | }; |
| 888 | auto null_one = [&](R_xlen_t i) { |
| 889 | p_data[i] = NA_REAL; |
| 890 | return Status::OK(); |
| 891 | }; |
| 892 | return IngestSome(array, n, ingest_one, null_one); |
| 893 | } |
| 894 | |
| 895 | private: |
| 896 | int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const { |
nothing calls this directly
no test coverage detected