MCPcopy Create free account
hub / github.com/apache/arrow / Converter_Struct

Method Converter_Struct

r/src/array_to_vector.cpp:781–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779class 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

Callers

nothing calls this directly

Calls 6

ValueOrStopFunction · 0.85
push_backMethod · 0.80
MakeFunction · 0.50
typeMethod · 0.45
num_fieldsMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected