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

Method Ingest_some_nulls

r/src/array_to_vector.cpp:856–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854 }
855
856 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
857 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
858 int multiplier = TimeUnit_multiplier(array);
859
860 auto p_data = REAL(data) + start;
861 auto p_values = array->data()->GetValues<value_type>(1);
862 auto ingest_one = [&](R_xlen_t i) {
863 p_data[i] = static_cast<double>(p_values[i]) / multiplier;
864 return Status::OK();
865 };
866 auto null_one = [&](R_xlen_t i) {
867 p_data[i] = NA_REAL;
868 return Status::OK();
869 };
870 return IngestSome(array, n, ingest_one, null_one);
871 }
872
873 private:
874 int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const {

Callers

nothing calls this directly

Calls 3

IngestSomeFunction · 0.85
OKFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected