Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions r/R/convert-array.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ convert_array.nanoarrow_vctr <- function(array, to, ...) {

#' @export
convert_array.vctrs_partial_frame <- function(array, to, ...) {
# The vctrs::partial_frame() is scheduled for removal in future vctrs
# https://github.com/apache/arrow-nanoarrow/issues/825
ptype <- infer_nanoarrow_ptype(array)
if (!is.data.frame(ptype)) {
stop_cant_convert_array(array, to)
Expand Down
12 changes: 0 additions & 12 deletions r/tests/testthat/test-convert-array.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,6 @@ test_that("convert to vector works for data.frame", {
)
})

test_that("convert to vector works for partial_frame", {
skip_if_not_installed("vctrs")

array <- as_nanoarrow_array(
data.frame(a = 1L, b = "two", stringsAsFactors = FALSE)
)
expect_identical(
convert_array(array, vctrs::partial_frame()),
data.frame(a = 1L, b = "two", stringsAsFactors = FALSE)
)
})

test_that("convert to vector works for extension<struct> -> data.frame()", {
array <- nanoarrow_extension_array(
data.frame(x = c(TRUE, FALSE, NA, FALSE, TRUE)),
Expand Down
Loading