romainfrancois commented on pull request #11805:
URL: https://github.com/apache/arrow/pull/11805#issuecomment-985352985


   As with `decimal128` this would not allow for creating arrays directly: 
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   #> See arrow_info() for available features
   
   Array$create(c(1, 2), type = decimal(4, 3))
   #> Error: NotImplemented: Extend
   ```
   
   <sup>Created on 2021-12-03 by the [reprex 
package](https://reprex.tidyverse.org) (v2.0.1.9000)</sup>
   
   The error comes from this class in `r_to_arrow.cpp`
   
   ```cpp
   template <typename T>
   class RPrimitiveConverter<T, enable_if_t<is_decimal_type<T>::value>>
       : public PrimitiveConverter<T, RConverter> {
    public:
     Status Extend(SEXP x, int64_t size, int64_t offset = 0) override {
       return Status::NotImplemented("Extend");
     }
   };
   ```
   
   Maybe we could catch the `NotImplemented` error, then convert to a guessed 
type, and then cast. 
   


-- 
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