You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Benson Muite (Jira)" <ji...@apache.org> on 2021/12/23 05:39:00 UTC

[jira] [Closed] (ARROW-14731) [C++][Compute] Conversion to unsigned types can be problematic for negative numbers

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

Benson Muite closed ARROW-14731.
--------------------------------
    Resolution: Invalid

> [C++][Compute] Conversion to unsigned types can be problematic for negative numbers
> -----------------------------------------------------------------------------------
>
>                 Key: ARROW-14731
>                 URL: https://issues.apache.org/jira/browse/ARROW-14731
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Benson Muite
>            Assignee: Benson Muite
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> On line 248 of https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc int16 type is converted to uint32 type because overflows are better handled in uint32 than in int32 This will be problematic if some of the numbers are negative. It may be better to use th default int32 and explicitly check for overflows if needed.



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