| 740 | class Converter_Struct : public Converter { |
| 741 | public: |
| 742 | explicit Converter_Struct(const std::shared_ptr<ChunkedArray>& chunked_array) |
| 743 | : Converter(chunked_array), converters() { |
| 744 | const auto& struct_type = |
| 745 | checked_cast<const arrow::StructType&>(*chunked_array->type()); |
| 746 | |
| 747 | int nf = struct_type.num_fields(); |
| 748 | |
| 749 | std::shared_ptr<arrow::Table> array_as_table = |
| 750 | ValueOrStop(arrow::Table::FromChunkedStructArray(chunked_array)); |
| 751 | for (int i = 0; i < nf; i++) { |
| 752 | converters.push_back(Converter::Make(array_as_table->column(i))); |
| 753 | } |
| 754 | } |
| 755 | |
| 756 | SEXP Allocate(R_xlen_t n) const { |
| 757 | // allocate a data frame column to host each array |
nothing calls this directly
no test coverage detected