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 0C9B0172E8 for ; Wed, 5 Nov 2014 22:57:35 +0000 (UTC) Received: (qmail 63113 invoked by uid 500); 5 Nov 2014 22:57:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 63040 invoked by uid 500); 5 Nov 2014 22:57:34 -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 63028 invoked by uid 500); 5 Nov 2014 22:57:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 63025 invoked by uid 99); 5 Nov 2014 22:57:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2014 22:57:34 +0000 Date: Wed, 5 Nov 2014 22:57:34 +0000 (UTC) From: "Jason Dere (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-8745) Joins on decimal keys return different results whether they are run as reduce join or map join 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-8745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14199292#comment-14199292 ] Jason Dere commented on HIVE-8745: ---------------------------------- Looks like HiveDecimal and HiveDecimalWritable have different comparison semantics in their equals() methods. For HiveDecimal, 1.1 != 1.10 For HIveDecimalWritable, 1.1 == 1.10 This is due to the fact that HiveDecimal.equals() uses BigDecimal.equals(), where the precision/scale/value all need to be the same to be considered equal. HiveDecimal probably should have been using BigDecimal.compareTo(), which is what is used in HiveDecimalWritable.equals(). [~xuefuz], [~spena], would you agree with this? > Joins on decimal keys return different results whether they are run as reduce join or map join > ---------------------------------------------------------------------------------------------- > > Key: HIVE-8745 > URL: https://issues.apache.org/jira/browse/HIVE-8745 > Project: Hive > Issue Type: Bug > Affects Versions: 0.14.0 > Reporter: Gunther Hagleitner > Priority: Critical > Attachments: join_test.q > > > See attached .q file to reproduce. The difference seems to be whether trailing 0s are considered the same value or not. -- This message was sent by Atlassian JIRA (v6.3.4#6332)