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

Method Allocate

r/src/array_to_vector.cpp:1059–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1057 : Converter(chunked_array), value_type_(value_type), list_size_(list_size) {}
1058
1059 SEXP Allocate(R_xlen_t n) const {
1060 cpp11::writable::list res(n);
1061 Rf_classgets(res, arrow::r::data::classes_arrow_fixed_size_list);
1062 res.attr(arrow::r::symbols::list_size) = Rf_ScalarInteger(list_size_);
1063
1064 std::shared_ptr<arrow::Array> array = CreateEmptyArray(value_type_);
1065
1066 // convert to an R object to store as the list' ptype
1067 res.attr(arrow::r::symbols::ptype) = Converter::Convert(array);
1068
1069 return res;
1070 }
1071
1072 Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const {
1073 // 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