Commits


Dewey Dunnington authored and GitHub committed e2533ad08ff
ARROW-18043: [R] Properly instantiate empty arrays of extension types in Table__from_schema (#14519) This PR supports the following: ``` r library(arrow, warn.conflicts = FALSE) #> Some features are not enabled in this build of Arrow. Run `arrow_info()` for more information. schema_with_ext_type <- schema( x = int32(), y = vctrs_extension_type(integer()) ) as_arrow_table(schema_with_ext_type) #> Table #> 0 rows x 2 columns #> $x <int32> #> $y <integer(0)> ``` <sup>Created on 2022-10-26 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup> It's a little bit cheating, though, because the previous approach is more true to what `ChunkedArray::MakeEmpty()` does. Is there a downside here to creating a `ChunkedArray` with zero chunks (as opposed to a `ChunkedArray()` with one empty chunk)? If there is we can probably work around it via creating an empty array of the storage type and wrapping it. Authored-by: Dewey Dunnington <dewey@voltrondata.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>