krlmlr opened a new issue, #55:
URL: https://github.com/apache/arrow-nanoarrow/issues/55

   Arrow issue: https://issues.apache.org/jira/projects/ARROW/issues/ARROW-17885
   
   BLOBs come back as lists of integers, where a list of raw is expected.
   
   ``` r
   library(nanoarrow)
   
   data <- data.frame(
     a = 1:3,
     b = 2.5,
     c = "three",
     stringsAsFactors = FALSE
   )
   data$d <- blob::blob(as.raw(1:10))
   
   tbl <- as_nanoarrow_array(data)
   tbl
   #> <nanoarrow_array +s[3]>
   #>  $ length    : int 3
   #>  $ null_count: int 0
   #>  $ offset    : int 0
   #>  $ buffers   :List of 1
   #>   ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>  $ children  :List of 4
   #>   ..$ a:<nanoarrow_array i[3]>
   #>   .. ..$ length    : int 3
   #>   .. ..$ null_count: int 0
   #>   .. ..$ offset    : int 0
   #>   .. ..$ buffers   :List of 2
   #>   .. .. ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>   .. .. ..$ :<nanoarrow_buffer_data_int32[12 b] at 0x110fb94f8>
   #>   .. ..$ dictionary: NULL
   #>   .. ..$ children  : list()
   #>   ..$ b:<nanoarrow_array g[3]>
   #>   .. ..$ length    : int 3
   #>   .. ..$ null_count: int 0
   #>   .. ..$ offset    : int 0
   #>   .. ..$ buffers   :List of 2
   #>   .. .. ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>   .. .. ..$ :<nanoarrow_buffer_data_double[24 b] at 0x1312bebe8>
   #>   .. ..$ dictionary: NULL
   #>   .. ..$ children  : list()
   #>   ..$ c:<nanoarrow_array u[3]>
   #>   .. ..$ length    : int 3
   #>   .. ..$ null_count: int 0
   #>   .. ..$ offset    : int 0
   #>   .. ..$ buffers   :List of 3
   #>   .. .. ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>   .. .. ..$ :<nanoarrow_buffer_data_offset32[16 b] at 0x1002a8000>
   #>   .. .. ..$ :<nanoarrow_buffer_data_utf8[15 b] at 0x1002a8080>
   #>   .. ..$ dictionary: NULL
   #>   .. ..$ children  : list()
   #>   ..$ d:<nanoarrow_array +l[3]>
   #>   .. ..$ length    : int 3
   #>   .. ..$ null_count: int 0
   #>   .. ..$ offset    : int 0
   #>   .. ..$ buffers   :List of 2
   #>   .. .. ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>   .. .. ..$ :<nanoarrow_buffer_data_offset32[16 b] at 0x1002a8040>
   #>   .. ..$ children  :List of 1
   #>   .. .. ..$ item:<nanoarrow_array C[30]>
   #>   .. .. .. ..$ length    : int 30
   #>   .. .. .. ..$ null_count: int 0
   #>   .. .. .. ..$ offset    : int 0
   #>   .. .. .. ..$ buffers   :List of 2
   #>   .. .. .. .. ..$ :<nanoarrow_buffer_validity[0 b] at 0x0>
   #>   .. .. .. .. ..$ :<nanoarrow_buffer_data_uint8[30 b] at 0x1002a8100>
   #>   .. .. .. ..$ dictionary: NULL
   #>   .. .. .. ..$ children  : list()
   #>   .. ..$ dictionary: NULL
   #>  $ dictionary: NULL
   
   waldo::compare(as.data.frame(tbl), data)
   #> `old$d[[1]]` is an integer vector (1, 2, 3, 4, 5, ...)
   #> `new$d[[1]]` is a raw vector (01, 02, 03, 04, 05, ...)
   #> 
   #> `old$d[[2]]` is an integer vector (1, 2, 3, 4, 5, ...)
   #> `new$d[[2]]` is a raw vector (01, 02, 03, 04, 05, ...)
   #> 
   #> `old$d[[3]]` is an integer vector (1, 2, 3, 4, 5, ...)
   #> `new$d[[3]]` is a raw vector (01, 02, 03, 04, 05, ...)
   ```
   
   <sup>Created on 2022-09-29 with [reprex 
v2.0.2](https://reprex.tidyverse.org)</sup>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to