[ 
https://issues.apache.org/jira/browse/ARROW-2480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444657#comment-16444657
 ] 

ASF GitHub Bot commented on ARROW-2480:
---------------------------------------

pitrou commented on a change in pull request #1917: ARROW-2480: [C++] Enable 
casting the value of a decimal to int32_t or int64_t
URL: https://github.com/apache/arrow/pull/1917#discussion_r182856638
 
 

 ##########
 File path: cpp/src/arrow/util/decimal.h
 ##########
 @@ -129,6 +129,20 @@ class ARROW_EXPORT Decimal128 {
   /// \brief Convert Decimal128 from one scale to another
   Status Rescale(int32_t original_scale, int32_t new_scale, Decimal128* out) 
const;
 
+  template <typename T, typename = typename EnableIfIsOneOf<T, int32_t, 
int64_t>>
+  Status to(T* out) const {
 
 Review comment:
   IMHO it would be clearer, more explicit, and more consistent with the other 
methods if this were called `ToInteger`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [C++] Enable casting the value of a decimal to int32_t or int64_t
> -----------------------------------------------------------------
>
>                 Key: ARROW-2480
>                 URL: https://issues.apache.org/jira/browse/ARROW-2480
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 0.9.0
>            Reporter: Phillip Cloud
>            Assignee: Phillip Cloud
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.1
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to