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

Method Ingest_some_nulls

r/src/array_to_vector.cpp:184–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
185 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
186 auto p_values = array->data()->GetValues<value_type>(1);
187 if (!p_values) {
188 return Status::Invalid("Invalid data buffer");
189 }
190 auto p_data = INTEGER(data) + start;
191 auto ingest_one = [&](R_xlen_t i) {
192 p_data[i] = static_cast<int>(p_values[i]);
193 return Status::OK();
194 };
195 auto null_one = [&](R_xlen_t i) {
196 p_data[i] = NA_INTEGER;
197 return Status::OK();
198 };
199
200 return IngestSome(array, n, ingest_one, null_one);
201 }
202};
203
204template <typename Type>

Callers 2

ScheduleConvertTasksMethod · 0.45
Ingest_some_nullsMethod · 0.45

Calls 4

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

Tested by

no test coverage detected