paleolimbot opened a new pull request #11850:
URL: https://github.com/apache/arrow/pull/11850


   This PR implements the Duration type in the R bindings, mapped to 
"difftime", which is the equivalent base R type. Currently a draft PR because 
I'm unsure how to implement the `Extend()` method of the converter:
   
   
https://github.com/apache/arrow/blob/7240420a38d4b12317d54fc5195ddcaa5f35cf61/r/src/r_to_arrow.cpp#L824-L826
   
   I've also copy-and-pasted the converter for the TIME32/hms object conversion 
because I was unsure how to subclass it to avoid the repetition in the moment.
   
   The gist of the PR is to allow this (which currently fails):
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   Array$create(as.difftime(123, units = "secs"))
   #> Error: NotImplemented: Extend
   ```
   
   <sup>Created on 2021-12-03 by the [reprex 
package](https://reprex.tidyverse.org) (v2.0.1)</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