| 976 | } |
| 977 | |
| 978 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 979 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 980 | using DecimalArray = typename TypeTraits<Type>::ArrayType; |
| 981 | auto p_data = REAL(data) + start; |
| 982 | const auto& decimals_arr = checked_cast<const DecimalArray&>(*array); |
| 983 | |
| 984 | auto ingest_one = [&](R_xlen_t i) { |
| 985 | p_data[i] = std::stod(decimals_arr.FormatValue(i).c_str()); |
| 986 | return Status::OK(); |
| 987 | }; |
| 988 | auto null_one = [&](R_xlen_t i) { |
| 989 | p_data[i] = NA_REAL; |
| 990 | return Status::OK(); |
| 991 | }; |
| 992 | |
| 993 | return IngestSome(array, n, ingest_one, null_one); |
| 994 | } |
| 995 | }; |
| 996 | |
| 997 | template <typename ListArrayType> |
nothing calls this directly
no test coverage detected