[ 
https://issues.apache.org/jira/browse/ARROW-15688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Pitrou resolved ARROW-15688.
------------------------------------
    Fix Version/s: 8.0.0
       Resolution: Fixed

Issue resolved by pull request 12438
[https://github.com/apache/arrow/pull/12438]

> [C++] add_checked doesn't error out on duration overflow
> --------------------------------------------------------
>
>                 Key: ARROW-15688
>                 URL: https://issues.apache.org/jira/browse/ARROW-15688
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 7.0.0
>            Reporter: Antoine Pitrou
>            Assignee: Rok Mihevc
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 8.0.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Example in Python:
> {code:python}
> >>> pa.compute.add_checked(pa.array([2**62], type=pa.duration('ms')), 
> >>> pa.array([2**62], type=pa.duration('ms')))
> <pyarrow.lib.DurationArray object at 0x7f1539465b80>
> [
>   -9223372036854775808
> ]
> {code}
> The same computation with plain integers correctly raises an error:
> {code:python}
> >>> pa.compute.add_checked(pa.array([2**62], type=pa.int64()), 
> >>> pa.array([2**62], type=pa.int64()))
> Traceback (most recent call last):
>   [...]
> ArrowInvalid: overflow
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to