| 1070 | } |
| 1071 | |
| 1072 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 1073 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 1074 | using DecimalArray = typename TypeTraits<Type>::ArrayType; |
| 1075 | auto p_data = REAL(data) + start; |
| 1076 | const auto& decimals_arr = checked_cast<const DecimalArray&>(*array); |
| 1077 | |
| 1078 | auto ingest_one = [&](R_xlen_t i) { |
| 1079 | p_data[i] = std::stod(decimals_arr.FormatValue(i).c_str()); |
| 1080 | return Status::OK(); |
| 1081 | }; |
| 1082 | auto null_one = [&](R_xlen_t i) { |
| 1083 | p_data[i] = NA_REAL; |
| 1084 | return Status::OK(); |
| 1085 | }; |
| 1086 | |
| 1087 | return IngestSome(array, n, ingest_one, null_one); |
| 1088 | } |
| 1089 | }; |
| 1090 | |
| 1091 | // Build a converter for the values of all chunks of a list-like chunked array, so |
nothing calls this directly
no test coverage detected