You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2020/05/07 12:04:00 UTC

[jira] [Commented] (ARROW-8568) [C++][Python] Crash on decimal cast in debug mode

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

Antoine Pitrou commented on ARROW-8568:
---------------------------------------

> Firstly there is design question - should calling Rescale with original_scale == new_scale be allowed ?

I think so.

> [C++][Python] Crash on decimal cast in debug mode
> -------------------------------------------------
>
>                 Key: ARROW-8568
>                 URL: https://issues.apache.org/jira/browse/ARROW-8568
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Python
>    Affects Versions: 0.17.0
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> {code:python}
> >>> arr = pa.array([Decimal('123.45')])                                                                                                                                   
> >>> arr                                                                                                                                                                   
> <pyarrow.lib.Decimal128Array object at 0x7efbbddd4210>
> [
>   123.45
> ]
> >>> arr.type                                                                                                                                                              
> Decimal128Type(decimal(5, 2))
> >>> arr.cast(pa.decimal128(4, 2))                                                                                                                                         
> ../src/arrow/util/basic_decimal.cc:626:  Check failed: (original_scale) != (new_scale) 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)