Maybe related to #220
I noticed that if we convert nanoarrow_array_stream to data.frame, the dictionary becomes a character.
stream <- data.frame(
x = as.factor(letters[1:5]),
y = as.factor(1:5)
) |>
nanoarrow::as_nanoarrow_array_stream()
stream
#> <nanoarrow_array_stream struct<x: dictionary(int32)<string>, y: dictionary(int32)<string>>>
#> $ get_schema:function ()
#> $ get_next :function (schema = x$get_schema(), validate = TRUE)
#> $ release :function ()
stream |>
tibble::as_tibble()
#> # A tibble: 5 × 2
#> x y
#> <chr> <chr>
#> 1 a 1
#> 2 b 2
#> 3 c 3
#> 4 d 4
#> 5 e 5
Created on 2024-06-09 with reprex v2.1.0