You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/08/07 00:57:01 UTC
[jira] [Commented] (IMPALA-7243) width_bucket() returns an
incorrect result
[ https://issues.apache.org/jira/browse/IMPALA-7243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570986#comment-16570986 ]
ASF subversion and git services commented on IMPALA-7243:
---------------------------------------------------------
Commit df3f1658461553a174dd27fce2edce8594aefd16 in impala's branch refs/heads/master from aphadke
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=df3f165 ]
IMPALA-7242/IMPALA-7243: check for overflow when converting IntVal to DecimalValue
This change adds a check for an overflow which can happen during
converting num_buckets from IntVal to a DecimalValue during width_bucket
evaluation. An overflow can result in hitting a DCHECK if it needs int256
for intermediate evaluations or returns a wrong result otherwise.
Change-Id: Ie5808802096bb0e6cfd4ab6464538474e42cab60
Reviewed-on: http://gerrit.cloudera.org:8080/11020
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
> width_bucket() returns an incorrect result
> ------------------------------------------
>
> Key: IMPALA-7243
> URL: https://issues.apache.org/jira/browse/IMPALA-7243
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 3.1.0
> Reporter: Taras Bobrovytsky
> Assignee: Anuj Phadke
> Priority: Critical
>
> The following query returns an incorrect result:
> {code:java}
> select width_bucket(cast(9 as decimal(10,7)), cast(-60000 as decimal(11,6)), cast(10 as decimal(7,5)), 249895273);{code}
> Result:
> {code:java}
> 1{code}
> Since 9 is slightly less than the upper bound, which is 10, the result should be the number of buckets.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org