Skip to content

Commit

Permalink
fix: the latest nanoarrow supports utf8view type
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Oct 16, 2024
1 parent e3c1343 commit c655549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Suggests:
jsonlite,
knitr,
lubridate,
nanoarrow (>= 0.4.0),
nanoarrow (>= 0.6.0),
nycflights13,
patrick,
pillar,
Expand Down
8 changes: 3 additions & 5 deletions tests/testthat/test-pkg-nanoarrow.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("as_nanoarrow_array_stream() works for DataFrame", {
skip_if_not_installed("nanoarrow")
skip_if_not_installed("nanoarrow", minimum_version = "0.6.0")

df = pl$DataFrame(a = 1L, b = "two")
stream = nanoarrow::as_nanoarrow_array_stream(df)
Expand All @@ -9,12 +9,10 @@ test_that("as_nanoarrow_array_stream() works for DataFrame", {
data.frame(a = 1L, b = "two")
)

# nanoarrow does not support the string view type yet
# https://github.com/apache/arrow-nanoarrow/pull/367
expect_grepl_error(
expect_identical(
nanoarrow::as_nanoarrow_array_stream(df, compat_level = TRUE) |>
as.data.frame(),
"Unknown format: 'vu'"
data.frame(a = 1L, b = "two")
)
})

Expand Down

0 comments on commit c655549

Please sign in to comment.