| 1027 | : Converter(chunked_array), value_type_(value_type) {} |
| 1028 | |
| 1029 | SEXP Allocate(R_xlen_t n) const { |
| 1030 | cpp11::writable::list res(n); |
| 1031 | |
| 1032 | if (std::is_same<ListArrayType, MapArray>::value) { |
| 1033 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_list; |
| 1034 | } else if (std::is_same<ListArrayType, ListArray>::value) { |
| 1035 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_list; |
| 1036 | } else { |
| 1037 | res.attr(R_ClassSymbol) = arrow::r::data::classes_arrow_large_list; |
| 1038 | } |
| 1039 | |
| 1040 | std::shared_ptr<arrow::Array> array = CreateEmptyArray(value_type_); |
| 1041 | |
| 1042 | // convert to an R object to store as the list' ptype |
| 1043 | res.attr(arrow::r::symbols::ptype) = Converter::Convert(array); |
| 1044 | |
| 1045 | return res; |
| 1046 | } |
| 1047 | |
| 1048 | Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { |
| 1049 | // nothing to do, list contain NULL by default |
nothing calls this directly
no test coverage detected