MCPcopy Create free account
hub / github.com/apache/arrow / Ingest_some_nulls

Method Ingest_some_nulls

r/src/array_to_vector.cpp:219–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 }
218
219 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
220 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
221 auto p_values = array->data()->GetValues<value_type>(1);
222 if (!p_values) {
223 return Status::Invalid("Invalid data buffer");
224 }
225 auto p_data = REAL(data) + start;
226 auto ingest_one = [&](R_xlen_t i) {
227 p_data[i] = static_cast<value_type>(p_values[i]);
228 return Status::OK();
229 };
230 auto null_one = [&](R_xlen_t i) {
231 p_data[i] = NA_REAL;
232 return Status::OK();
233 };
234
235 return IngestSome(array, n, ingest_one, null_one);
236 }
237};
238
239class Converter_Date32 : public Converter {

Callers

nothing calls this directly

Calls 4

IngestSomeFunction · 0.85
InvalidClass · 0.50
OKFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected