Convert each child of the slice through its own converter, rather than allocating then ingesting: that lets children that can only convert whole arrays (extension types) work, and children that can be altrep be altrep
| 815 | // allocating then ingesting: that lets children that can only convert whole |
| 816 | // arrays (extension types) work, and children that can be altrep be altrep |
| 817 | SEXP ConvertSlice(const std::shared_ptr<Array>& slice, size_t chunk_index) const { |
| 818 | const auto& struct_array = checked_cast<const arrow::StructArray&>(*slice); |
| 819 | // Flatten() deals with merging of nulls |
| 820 | auto arrays = ValueOrStop(struct_array.Flatten(gc_memory_pool())); |
| 821 | int nf = static_cast<int>(converters.size()); |
| 822 | |
| 823 | cpp11::writable::list out(nf); |
| 824 | for (int i = 0; i < nf; i++) { |
| 825 | out[i] = converters[i]->ConvertSlice(arrays[i], chunk_index); |
| 826 | } |
| 827 | return FinishDataFrame(out, slice->length()); |
| 828 | } |
| 829 | |
| 830 | Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { |
| 831 | int nf = static_cast<int>(converters.size()); |
nothing calls this directly
no test coverage detected