| 779 | class Converter_Struct : public Converter { |
| 780 | public: |
| 781 | explicit Converter_Struct(const std::shared_ptr<ChunkedArray>& chunked_array) |
| 782 | : Converter(chunked_array), converters() { |
| 783 | const auto& struct_type = |
| 784 | checked_cast<const arrow::StructType&>(*chunked_array->type()); |
| 785 | |
| 786 | int nf = struct_type.num_fields(); |
| 787 | |
| 788 | std::shared_ptr<arrow::Table> array_as_table = |
| 789 | ValueOrStop(arrow::Table::FromChunkedStructArray(chunked_array)); |
| 790 | for (int i = 0; i < nf; i++) { |
| 791 | converters.push_back(Converter::Make(array_as_table->column(i))); |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | SEXP Allocate(R_xlen_t n) const { |
| 796 | // allocate a data frame column to host each array |
nothing calls this directly
no test coverage detected