| 1005 | : Converter(chunked_array), value_type_(value_type) {} |
| 1006 | |
| 1007 | SEXP Allocate(R_xlen_t n) const { |
| 1008 | cpp11::writable::list res(n); |
| 1009 | |
| 1010 | if (std::is_same<ListArrayType, MapArray>::value) { |
| 1011 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_list; |
| 1012 | } else if (std::is_same<ListArrayType, ListArray>::value) { |
| 1013 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_list; |
| 1014 | } else { |
| 1015 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_large_list; |
| 1016 | } |
| 1017 | |
| 1018 | std::shared_ptr<arrow::Array> array = CreateEmptyArray(value_type_); |
| 1019 | |
| 1020 | // convert to an R object to store as the list' ptype |
| 1021 | res.attr(arrow::r::symbols::ptype) = Converter::Convert(array); |
| 1022 | |
| 1023 | return res; |
| 1024 | } |
| 1025 | |
| 1026 | Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { |
| 1027 | // nothing to do, list contain NULL by default |
nothing calls this directly
no test coverage detected