You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Taras Bobrovytsky (Code Review)" <ge...@cloudera.org> on 2017/11/14 22:24:01 UTC

[Impala-ASF-CR] IMPALA-6183: Fix Decimal to Double conversion

Taras Bobrovytsky has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8547


Change subject: IMPALA-6183: Fix Decimal to Double conversion
......................................................................

IMPALA-6183: Fix Decimal to Double conversion

When converting a decimal to a double, we incorrectly used the powf()
function in the backend, which returns a float instead of a double.
This caused us to lose precision.

We fix the problem by replacing the powf() function with a pow()
function, which returns a double.

Testing:
- Added an EE test.

Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
---
M be/src/runtime/decimal-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/decimal-exprs.test
2 files changed, 27 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/8547/1
-- 
To view, visit http://gerrit.cloudera.org:8080/8547
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Gerrit-Change-Number: 8547
Gerrit-PatchSet: 1
Gerrit-Owner: Taras Bobrovytsky <tb...@cloudera.com>

[Impala-ASF-CR] IMPALA-6183: Fix Decimal to Double conversion

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/8547 )

Change subject: IMPALA-6183: Fix Decimal to Double conversion
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/1467/


-- 
To view, visit http://gerrit.cloudera.org:8080/8547
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Gerrit-Change-Number: 8547
Gerrit-PatchSet: 1
Gerrit-Owner: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 14 Nov 2017 23:30:46 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6183: Fix Decimal to Double conversion

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/8547 )

Change subject: IMPALA-6183: Fix Decimal to Double conversion
......................................................................


Patch Set 1: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/8547
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Gerrit-Change-Number: 8547
Gerrit-PatchSet: 1
Gerrit-Owner: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 15 Nov 2017 02:54:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6183: Fix Decimal to Double conversion

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/8547 )

Change subject: IMPALA-6183: Fix Decimal to Double conversion
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/8547
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Gerrit-Change-Number: 8547
Gerrit-PatchSet: 1
Gerrit-Owner: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 14 Nov 2017 22:28:08 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6183: Fix Decimal to Double conversion

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8547 )

Change subject: IMPALA-6183: Fix Decimal to Double conversion
......................................................................

IMPALA-6183: Fix Decimal to Double conversion

When converting a decimal to a double, we incorrectly used the powf()
function in the backend, which returns a float instead of a double.
This caused us to lose precision.

We fix the problem by replacing the powf() function with a pow()
function, which returns a double.

Testing:
- Added an EE test.

Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Reviewed-on: http://gerrit.cloudera.org:8080/8547
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M be/src/runtime/decimal-value.inline.h
M testdata/workloads/functional-query/queries/QueryTest/decimal-exprs.test
2 files changed, 27 insertions(+), 1 deletion(-)

Approvals:
  Alex Behm: Looks good to me, approved
  Impala Public Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/8547
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9bf81d039e5037f22c64a32b328832235aafe9e3
Gerrit-Change-Number: 8547
Gerrit-PatchSet: 2
Gerrit-Owner: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>