[
https://issues.apache.org/jira/browse/ARROW-9022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124992#comment-17124992
]
Krisztian Szucs edited comment on ARROW-9022 at 6/3/20, 2:28 PM:
-----------------------------------------------------------------
It's not trivial which behaviour to choose. We may introduce options for the
arithmetic kernels to select the right one.
As a reference clickhouse follows the upcasting semantics, [seems
like|https://github.com/cwida/duckdb/blob/master/src/common/value_operations/numeric_operations.cpp#L29]
DuckDB also do upcast for non 64-bit integer arithmetics.
was (Author: kszucs):
It's not trivial which behaviour to choose. We may introduce options for the
arithmetic kernels to select the right one.
As a reference clickhouse follows the upcasting semantics.
> [C++][Compute] Make Add function safe for numeric limits
> --------------------------------------------------------
>
> Key: ARROW-9022
> URL: https://issues.apache.org/jira/browse/ARROW-9022
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Krisztian Szucs
> Assignee: Krisztian Szucs
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently the output type of the Add function is identical with the argument
> types which makes it unsafe to add numeric limit values, so instead of using
> {{(int8, int8) -> int8}} signature we should use {{((int8, int8) -> int16}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)