| 718 | class Converter_Struct : public Converter { |
| 719 | public: |
| 720 | explicit Converter_Struct(const std::shared_ptr<ChunkedArray>& chunked_array) |
| 721 | : Converter(chunked_array), converters() { |
| 722 | const auto& struct_type = |
| 723 | checked_cast<const arrow::StructType&>(*chunked_array->type()); |
| 724 | |
| 725 | int nf = struct_type.num_fields(); |
| 726 | |
| 727 | std::shared_ptr<arrow::Table> array_as_table = |
| 728 | ValueOrStop(arrow::Table::FromChunkedStructArray(chunked_array)); |
| 729 | for (int i = 0; i < nf; i++) { |
| 730 | converters.push_back(Converter::Make(array_as_table->column(i))); |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | SEXP Allocate(R_xlen_t n) const { |
| 735 | // allocate a data frame column to host each array |
nothing calls this directly
no test coverage detected