| 768 | } |
| 769 | |
| 770 | Status Ingest_some_nulls(SEXP data, const std::shared_ptr<arrow::Array>& array, |
| 771 | R_xlen_t start, R_xlen_t n, size_t chunk_index) const { |
| 772 | auto struct_array = checked_cast<const arrow::StructArray*>(array.get()); |
| 773 | int nf = static_cast<int>(converters.size()); |
| 774 | // Flatten() deals with merging of nulls |
| 775 | auto arrays = ValueOrStop(struct_array->Flatten(gc_memory_pool())); |
| 776 | for (int i = 0; i < nf; i++) { |
| 777 | SEXP data_i = VECTOR_ELT(data, i); |
| 778 | |
| 779 | // only ingest if the column is not altrep |
| 780 | if (!altrep::is_unmaterialized_arrow_altrep(data_i)) { |
| 781 | StopIfNotOk(converters[i]->Ingest_some_nulls(VECTOR_ELT(data, i), arrays[i], |
| 782 | start, n, chunk_index)); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | return Status::OK(); |
| 787 | } |
| 788 | |
| 789 | virtual bool Parallel() const { |
| 790 | // this can only run in parallel if all the |
nothing calls this directly
no test coverage detected