Benson Muite created ARROW-14731:
------------------------------------

             Summary: [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


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)

Reply via email to