You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Taras Bobrovytsky (JIRA)" <ji...@apache.org> on 2017/12/08 19:16:01 UTC
[jira] [Resolved] (IMPALA-6292) Decimal v2 subtraction hits a
DCHECK
[ https://issues.apache.org/jira/browse/IMPALA-6292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Taras Bobrovytsky resolved IMPALA-6292.
---------------------------------------
Resolution: Fixed
Fix Version/s: Impala 2.11.0
{code}
commit 542dc227c613e2fbe2b9a4f98817f395b2d1238c
Author: Taras Bobrovytsky <tb...@cloudera.com>
Date: Thu Dec 7 16:51:35 2017 -0800
IMPALA-6292: Fix incorrect DCHECK in decimal subtraction
When subtracting two decimals, and one of them is large, we incorrectly
hit a DCHECK if the intermediate result was equal to 10^39-1, which is
MAX_UNSCALED_DECIMAL16. We fix the problem by changing the condition in
the DCHECK from "less than" to "less than or equal to".
Testing:
- Added expr tests that reproduce the issue.
Change-Id: I42d42ad85efe32b7a0db0d2353385939fee09934
Reviewed-on: http://gerrit.cloudera.org:8080/8796
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins
{code}
> Decimal v2 subtraction hits a DCHECK
> ------------------------------------
>
> Key: IMPALA-6292
> URL: https://issues.apache.org/jira/browse/IMPALA-6292
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 2.11.0
> Reporter: Taras Bobrovytsky
> Assignee: Taras Bobrovytsky
> Priority: Blocker
> Fix For: Impala 2.11.0
>
>
> The following query causes a DCHECK when executed with decimal_v2 enabled:
> {code}
> select cast(1 as decimal(13,12)) - cast(0.99999999999999999999999999999999999999 as decimal(38,38))
> {code}
> DCHECK:
> {code}
> decimal-value.inline.h:274] Check failed: abs(right) < DecimalUtil::MAX_UNSCALED_DECIMAL16
> {code}
> This was found using fuzz testing.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)