Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EADF17653 for ; Wed, 7 Oct 2015 22:23:27 +0000 (UTC) Received: (qmail 47462 invoked by uid 500); 7 Oct 2015 22:23:27 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 47432 invoked by uid 500); 7 Oct 2015 22:23:27 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 47422 invoked by uid 99); 7 Oct 2015 22:23:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2015 22:23:27 +0000 Date: Wed, 7 Oct 2015 22:23:27 +0000 (UTC) From: "Prasanth Jayachandran (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-12025) refactor bucketId generating code 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-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14947706#comment-14947706 ] Prasanth Jayachandran commented on HIVE-12025: ---------------------------------------------- The changes introduced in this patch in BucketIdResolverImpl is the correct way to compute bucket number. ReduceSinkOperator had a bug in bucket number computation regarding negative hashcodes (multiplying by -1 vs mast with Int.MAX). There might be some test failures related to this change but that is the expected change. Since these are util methods, it will be good to have unit tests for these (if one doesnot exist). Other than that, lgtm +1. Pending tests. > refactor bucketId generating code > --------------------------------- > > Key: HIVE-12025 > URL: https://issues.apache.org/jira/browse/HIVE-12025 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 1.0.1 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Attachments: HIVE-12025.2.patch, HIVE-12025.patch > > > HIVE-11983 adds ObjectInspectorUtils.getBucketHashCode() and getBucketNumber(). > There are several (at least) places in Hive that perform this computation: > # ReduceSinkOperator.computeBucketNumber > # ReduceSinkOperator.computeHashCode > # BucketIdResolverImpl - only in 2.0.0 ASF line > # FileSinkOperator.findWriterOffset > # GenericUDFHash > Should refactor it and make sure they all call methods from ObjectInspectorUtils. -- This message was sent by Atlassian JIRA (v6.3.4#6332)