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 E4254E1C0 for ; Fri, 22 Feb 2013 07:32:17 +0000 (UTC) Received: (qmail 33596 invoked by uid 500); 22 Feb 2013 07:32:16 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 33490 invoked by uid 500); 22 Feb 2013 07:32:15 -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 32689 invoked by uid 500); 22 Feb 2013 07:32:14 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 32614 invoked by uid 99); 22 Feb 2013 07:32:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2013 07:32:13 +0000 Date: Fri, 22 Feb 2013 07:32:13 +0000 (UTC) From: "binlijin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-4057) LazyHBaseRow may return cache data if the field is null and make the result wrong 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-4057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] binlijin updated HIVE-4057: --------------------------- Attachment: HIVE-4057.patch > LazyHBaseRow may return cache data if the field is null and make the result wrong > --------------------------------------------------------------------------------- > > Key: HIVE-4057 > URL: https://issues.apache.org/jira/browse/HIVE-4057 > Project: Hive > Issue Type: Bug > Components: HBase Handler > Affects Versions: 0.11.0 > Reporter: binlijin > Attachments: HIVE-4057.patch > > > LazyHBaseRow > {code} > private Object uncheckedGetField(int fieldID) { > if(!fieldsInited[fieldID]) { > fieldsInited[fieldID] = true; > byte [] res = result.getValue(colMap.familyNameBytes, colMap.qualifierNameBytes); > if (res == null) { > return null; > } > } > return fields[fieldID].getObject(); > } > {code} > if there is a LazyHBaseRow instance row, the fieldID is 0, we assume this field is null, so the first time row.uncheckedGetField(0) will return null, but the second time when row.uncheckedGetField(0) will return fields[fieldID].getObject(), this is the last cache data. -- 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