| 998 | } |
| 999 | |
| 1000 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 1001 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 1002 | using DecimalArray = typename TypeTraits<Type>::ArrayType; |
| 1003 | auto p_data = REAL(data) + start; |
| 1004 | const auto& decimals_arr = checked_cast<const DecimalArray&>(*array); |
| 1005 | |
| 1006 | auto ingest_one = [&](R_xlen_t i) { |
| 1007 | p_data[i] = std::stod(decimals_arr.FormatValue(i).c_str()); |
| 1008 | return Status::OK(); |
| 1009 | }; |
| 1010 | auto null_one = [&](R_xlen_t i) { |
| 1011 | p_data[i] = NA_REAL; |
| 1012 | return Status::OK(); |
| 1013 | }; |
| 1014 | |
| 1015 | return IngestSome(array, n, ingest_one, null_one); |
| 1016 | } |
| 1017 | }; |
| 1018 | |
| 1019 | template <typename ListArrayType> |
nothing calls this directly
no test coverage detected