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

Method Allocate

r/src/array_to_vector.cpp:1081–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1079 : Converter(chunked_array), value_type_(value_type), list_size_(list_size) {}
1080
1081 SEXP Allocate(R_xlen_t n) const {
1082 cpp11::writable::list res(n);
1083 Rf_classgets(res, arrow::r::data::classes_arrow_fixed_size_list);
1084 res.attr(arrow::r::symbols::list_size) = Rf_ScalarInteger(list_size_);
1085
1086 std::shared_ptr<arrow::Array> array = CreateEmptyArray(value_type_);
1087
1088 // convert to an R object to store as the list' ptype
1089 res.attr(arrow::r::symbols::ptype) = Converter::Convert(array);
1090
1091 return res;
1092 }
1093
1094 Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const {
1095 // nothing to do, list contain NULL by default

Callers

nothing calls this directly

Calls 2

CreateEmptyArrayFunction · 0.85
ConvertFunction · 0.50

Tested by

no test coverage detected