paleolimbot opened a new pull request, #208:
URL: https://github.com/apache/arrow-nanoarrow/pull/208

   After #207, buffer data types are readily available. Before, the R bindings 
did most of this on their own to get debug buffer printing. This PR exploits 
the new feature to improve debug output and adds the ability to convert buffers 
into R vectors along the way.
   
   Before this PR:
   
   ``` r
   library(nanoarrow)
   as_nanoarrow_array(c(NA, stringr::words))
   #> <nanoarrow_array string[981]>
   #>  $ length    : int 981
   #>  $ null_count: int 1
   #>  $ offset    : int 0
   #>  $ buffers   :List of 3
   #>   ..$ :<nanoarrow_buffer_validity[123 b] at 0x13b71d8d0>
   #>   ..$ :<nanoarrow_buffer_data_offset32[3928 b] at 0x13d87b600>
   #>   ..$ :<nanoarrow_buffer_data_utf8[5126 b] at 0x13d87c600>
   #>  $ dictionary: NULL
   #>  $ children  : list()
   ```
   
   <sup>Created on 2023-05-30 with [reprex 
v2.0.2](https://reprex.tidyverse.org)</sup>
   
   After this PR:
   
   ``` r
   library(nanoarrow)
   as_nanoarrow_array(c(NA, stringr::words))
   #> <nanoarrow_array string[981]>
   #>  $ length    : int 981
   #>  $ null_count: int 1
   #>  $ offset    : int 0
   #>  $ buffers   :List of 3
   #>   ..$ :<nanoarrow_buffer validity<bool>[984][123 b]> `FALSE TRUE TRUE 
TRUE T...`
   #>   ..$ :<nanoarrow_buffer data_offset<int32>[982][3928 b]> `0 0 1 5 10 18 
24 ...`
   #>   ..$ :<nanoarrow_buffer data<string>[5126 b]> 
`aableaboutabsoluteacceptacco...`
   #>  $ dictionary: NULL
   #>  $ children  : list()
   ```
   
   <sup>Created on 2023-05-30 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