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 769D0C42E for ; Tue, 3 Jul 2012 13:39:22 +0000 (UTC) Received: (qmail 34891 invoked by uid 500); 3 Jul 2012 13:39:22 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 34556 invoked by uid 500); 3 Jul 2012 13:39:21 -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 34387 invoked by uid 500); 3 Jul 2012 13:39:20 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 34377 invoked by uid 99); 3 Jul 2012 13:39:20 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 13:39:20 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 6B4F4142851 for ; Tue, 3 Jul 2012 13:39:20 +0000 (UTC) Date: Tue, 3 Jul 2012 13:39:20 +0000 (UTC) From: "Neha Tomar (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <888587314.209.1341322760441.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1679271301.37377.1340247283715.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HIVE-3168) LazyBinaryObjectInspector.getPrimitiveJavaObject copies beyond length of underlying BytesWritable 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-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405922#comment-13405922 ] Neha Tomar commented on HIVE-3168: ---------------------------------- One more question here. Do we need to apply both the patches attached? > LazyBinaryObjectInspector.getPrimitiveJavaObject copies beyond length of underlying BytesWritable > ------------------------------------------------------------------------------------------------- > > Key: HIVE-3168 > URL: https://issues.apache.org/jira/browse/HIVE-3168 > Project: Hive > Issue Type: Bug > Components: Serializers/Deserializers > Affects Versions: 0.9.0 > Reporter: Thejas M Nair > Assignee: Thejas M Nair > Fix For: 0.10.0, 0.9.1 > > Attachments: HIVE-3168.1.patch, HIVE-3168.2.patch > > > LazyBinaryObjectInspector.getPrimitiveJavaObject copies the full capacity of the LazyBinary's underlying BytesWritable object, which can be greater than the size of the actual contents. > This leads to additional characters at the end of the ByteArrayRef returned. When the LazyBinary object gets re-used, there can be remnants of the later portion of previous entry. > This was not seen while reading through hive queries, which I think is because a copy elsewhere seems to create LazyBinary with length == capacity. (probably LazyBinary copy constructor). This was seen when MR or pig used Hcatalog to read the data. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira