Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B73B310330 for ; Wed, 14 Aug 2013 14:38:59 +0000 (UTC) Received: (qmail 58664 invoked by uid 500); 14 Aug 2013 14:38:55 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 58533 invoked by uid 500); 14 Aug 2013 14:38:55 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 57907 invoked by uid 500); 14 Aug 2013 14:38:49 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 57892 invoked by uid 99); 14 Aug 2013 14:38:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 14:38:49 +0000 Date: Wed, 14 Aug 2013 14:38:49 +0000 (UTC) From: "Teddy Choi (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5022) Decimal Arithmetic generates NULL value MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Teddy Choi updated HIVE-5022: ----------------------------- Status: Open (was: Patch Available) > Decimal Arithmetic generates NULL value > --------------------------------------- > > Key: HIVE-5022 > URL: https://issues.apache.org/jira/browse/HIVE-5022 > Project: Hive > Issue Type: Bug > Components: Types > Affects Versions: 0.11.0 > Environment: Hortonworks 1.3 running Hive 0.11.0.1.3.0.0-107 > Reporter: Kevin Soo Hoo > Assignee: Teddy Choi > Attachments: HIVE-5022.1.patch.txt, HIVE-5022.2.patch.txt > > > When a decimal division is the first operation, the quotient cannot be multiplied in a subsequent calculation. Instead, a NULL is returned. > The following yield NULL results: > select (cast (4.53 as decimal) / cast(25.86 as decimal)) * cast(0.087 as decimal) from limit 1; > select cast (4.53 as decimal) / cast(25.86 as decimal) * cast(0.087 as decimal) from limit 1; > If we move the multiplication operation to be first, then it will successfully calculate the result. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira