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

Method Ingest_some_nulls

r/src/array_to_vector.cpp:792–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790 }
791
792 Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array,
793 R_xlen_t start, R_xlen_t n, size_t chunk_index) const {
794 auto struct_array = checked_cast<const arrow::StructArray*>(array.get());
795 int nf = static_cast<int>(converters.size());
796 // Flatten() deals with merging of nulls
797 auto arrays = ValueOrStop(struct_array->Flatten(gc_memory_pool()));
798 for (int i = 0; i < nf; i++) {
799 SEXP data_i = VECTOR_ELT(data, i);
800
801 // only ingest if the column is not altrep
802 if (!altrep::is_unmaterialized_arrow_altrep(data_i)) {
803 StopIfNotOk(converters[i]->Ingest_some_nulls(VECTOR_ELT(data, i), arrays[i],
804 start, n, chunk_index));
805 }
806 }
807
808 return Status::OK();
809 }
810
811 virtual bool Parallel() const {
812 // this can only run in parallel if all the

Callers

nothing calls this directly

Calls 9

ValueOrStopFunction · 0.85
gc_memory_poolFunction · 0.85
StopIfNotOkFunction · 0.85
OKFunction · 0.50
getMethod · 0.45
sizeMethod · 0.45
FlattenMethod · 0.45
Ingest_some_nullsMethod · 0.45

Tested by

no test coverage detected