Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B625F200C39 for ; Thu, 2 Mar 2017 01:11:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B4C6C160B78; Thu, 2 Mar 2017 00:11:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 08CA8160B70 for ; Thu, 2 Mar 2017 01:11:56 +0100 (CET) Received: (qmail 1374 invoked by uid 500); 2 Mar 2017 00:11:56 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 1363 invoked by uid 99); 2 Mar 2017 00:11:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 00:11:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7930A1A7AB8 for ; Thu, 2 Mar 2017 00:11:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.162 X-Spam-Level: * X-Spam-Status: No, score=1.162 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id u2N2BtqqVnnu for ; Thu, 2 Mar 2017 00:11:54 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 740D25F36B for ; Thu, 2 Mar 2017 00:11:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v220Bdlq003523; Thu, 2 Mar 2017 00:11:39 GMT Message-Id: <201703020011.v220Bdlq003523@ip-10-146-233-104.ec2.internal> Date: Thu, 2 Mar 2017 00:11:38 +0000 From: "Zach Amsden (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Ho , Dan Hecht Reply-To: zamsden@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4813=3A_Round_on_divide_and_multiply=0A?= X-Gerrit-Change-Id: Ie6bfcbe37555b74598d409c6f84f06b0ae5c4312 X-Gerrit-ChangeURL: X-Gerrit-Commit: 2993848b4cf4e5b53dcf758024b5f2970a2b49df In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Thu, 02 Mar 2017 00:11:57 -0000 Zach Amsden has uploaded a new patch set (#11). Change subject: IMPALA-4813: Round on divide and multiply ...................................................................... IMPALA-4813: Round on divide and multiply Address rounding on divide and multiply when results are truncated. Testing: Manually ran some divides that should overflow, then added the results to the test. Made the decimal-test use rounding behavior by default, and now the error margin of the test has decreased. Initial perf results: Multiply is totall uninteresting so far, all implementations return the same values in the same time: +-------------------------+-----------------------------------+ | sum(l_quantity * l_tax) | sum(l_extendedprice * l_discount) | +-------------------------+-----------------------------------+ | 61202493.3700 | 114698450836.4234 | +-------------------------+-----------------------------------+ Fetched 1 row(s) in 1.13s Divide shows no regression from prior with DECIMAL_V2 off: +-----------------------------+-----------------------------------+ | sum(l_quantity / l_tax) | sum(l_extendedprice / l_discount) | +-----------------------------+-----------------------------------+ | 46178777464.523809516381723 | 61076151920731.010714279183910 | +-----------------------------+-----------------------------------+ before: Fetched 1 row(s) in 13.08s after: Fetched 1 row(s) in 13.06s And with DECIMAL_V2 on: +-----------------------------+-----------------------------------+ | sum(l_quantity / l_tax) | sum(l_extendedprice / l_discount) | +-----------------------------+-----------------------------------+ | 46178777464.523809523847285 | 61076151920731.010714285714202 | +-----------------------------+-----------------------------------+ Fetched 1 row(s) in 16.06s So the performance regression is not as bad as expected. Still, divide performance could use some work. Change-Id: Ie6bfcbe37555b74598d409c6f84f06b0ae5c4312 --- M be/src/exprs/aggregate-functions-ir.cc M be/src/exprs/decimal-operators-ir.cc M be/src/exprs/expr-test.cc M be/src/runtime/decimal-test.cc M be/src/runtime/decimal-value.h M be/src/runtime/decimal-value.inline.h M be/src/runtime/types.cc M be/src/runtime/types.h M be/src/util/bit-util-test.cc M be/src/util/bit-util.h M be/src/util/string-parser.h 11 files changed, 849 insertions(+), 414 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/32/6132/11 -- To view, visit http://gerrit.cloudera.org:8080/6132 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie6bfcbe37555b74598d409c6f84f06b0ae5c4312 Gerrit-PatchSet: 11 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Zach Amsden Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Zach Amsden