[
https://issues.apache.org/jira/browse/IMPALA-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17177324#comment-17177324
]
Tim Armstrong commented on IMPALA-2710:
---------------------------------------
Note that we have __builtin_add_overflow(), etc in gcc5+
https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html. There were
some issues with using these for 128-bit decimals (IMPALA-3345), but we could
hopefully use them without any issues for integers.
> Overflows during expr evaluation should result in an error or null
> ------------------------------------------------------------------
>
> Key: IMPALA-2710
> URL: https://issues.apache.org/jira/browse/IMPALA-2710
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 2.0, Impala 2.3.0
> Reporter: casey
> Priority: Major
> Labels: correctness, downgraded
>
> Currently, not all expressions will result in NULL when an overflow happens.
> So determining if the resulting value is valid may be very difficult.
> Easy example:
> {noformat}
> [nightly-3.vpc.cloudera.com:21000] > select
> sum(99999999999999999999999999999999999999) from sample_07;
> Query: select sum(99999999999999999999999999999999999999) from sample_07
> +---------------------------------------------+
> | sum(99999999999999999999999999999999999999) |
> +---------------------------------------------+
> | -48332794867108158136654998487907173175 |
> +---------------------------------------------+
> {noformat}
> the sum above should never be negative, but if it were a positive value and
> the sum were over a column it would be hard to tell if the value was correct.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]