Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(r): Allow opt-out of warning for unregistered extension types #632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Sep 20, 2024

Closes #631.

# Using pak::pak("apache/arrow-nanoarrow/r#632")
library(nanoarrow)
array <- as_nanoarrow_array(data.frame(x = 1:5, y = letters[1:5]))
array$children$z <- nanoarrow_extension_array(letters[1:5], "some_extension")

# warns!
tibble::as_tibble(array)
#> Warning in warn_unregistered_extension_type(x): z: Converting unknown extension
#> some_extension{string} as storage type
#> Warning in warn_unregistered_extension_type(storage): z: Converting unknown
#> extension some_extension{string} as storage type
#> # A tibble: 5 × 3
#>       x y     z    
#>   <int> <chr> <chr>
#> 1     1 a     a    
#> 2     2 b     b    
#> 3     3 c     c    
#> 4     4 d     d    
#> 5     5 e     e

# doesn't!
options(nanoarrow.warn_unregistered_extension = FALSE)
tibble::as_tibble(array)
#> # A tibble: 5 × 3
#>       x y     z    
#>   <int> <chr> <chr>
#> 1     1 a     a    
#> 2     2 b     b    
#> 3     3 c     c    
#> 4     4 d     d    
#> 5     5 e     e

Created on 2024-09-20 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide some way to suppress warning about unknown extension?
1 participant