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 688C918E3A for ; Thu, 19 Nov 2015 08:14:13 +0000 (UTC) Received: (qmail 75105 invoked by uid 500); 19 Nov 2015 08:14:11 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 75000 invoked by uid 500); 19 Nov 2015 08:14:11 -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 74975 invoked by uid 99); 19 Nov 2015 08:14:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 08:14:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 042452C0453 for ; Thu, 19 Nov 2015 08:14:11 +0000 (UTC) Date: Thu, 19 Nov 2015 08:14:11 +0000 (UTC) From: "Gopal V (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-12463) VectorMapJoinFastKeyStore has Array OOB errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Gopal V created HIVE-12463: ------------------------------ Summary: VectorMapJoinFastKeyStore has Array OOB errors Key: HIVE-12463 URL: https://issues.apache.org/jira/browse/HIVE-12463 Project: Hive Issue Type: Bug Components: Vectorization Affects Versions: 2.0.0 Reporter: Gopal V Assignee: Gopal V When combining different sized keys, observing an occasional error in hashtable probes. {code} Caused by: java.lang.ArrayIndexOutOfBoundsException: 162046429 at org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastKeyStore.equalKey(VectorMapJoinFastKeyStore.java:150) at org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastBytesHashTable.findReadSlot(VectorMapJoinFastBytesHashTable.java:191) at org.apache.hadoop.hive.ql.exec.vector.mapjoin.fast.VectorMapJoinFastBytesHashMap.lookup(VectorMapJoinFastBytesHashMap.java:76) at org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinInnerMultiKeyOperator.process(VectorMapJoinInnerMultiKeyOperator.java:300) ... 26 more {code} {code} // Our reading is positioned to the key. writeBuffers.getByteSegmentRefToCurrent(byteSegmentRef, keyLength, readPos); byte[] currentBytes = byteSegmentRef.getBytes(); int currentStart = (int) byteSegmentRef.getOffset(); for (int i = 0; i < keyLength; i++) { if (currentBytes[currentStart + i] != keyBytes[keyStart + i]) { // LOG.debug("VectorMapJoinFastKeyStore equalKey no match on bytes"); return false; } } {code} This needs an identical fix to match {code} // Rare case of buffer boundary. Unfortunately we'd have to copy some bytes. // Rare case of buffer boundary. Unfortunately we'd have to copy some bytes. byte[] bytes = new byte[length]; int destOffset = 0; while (destOffset < length) { ponderNextBufferToRead(readPos); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)