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

Method Converter_Struct

r/src/array_to_vector.cpp:720–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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