Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C544B200CB9 for ; Sun, 18 Jun 2017 08:06:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C4727160BEF; Sun, 18 Jun 2017 06:06:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 16AAA160BD2 for ; Sun, 18 Jun 2017 08:06:04 +0200 (CEST) Received: (qmail 64897 invoked by uid 500); 18 Jun 2017 06:06:04 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 64888 invoked by uid 99); 18 Jun 2017 06:06:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Jun 2017 06:06:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DF5641A7AA8 for ; Sun, 18 Jun 2017 06:06:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id fpipfH3RfXR0 for ; Sun, 18 Jun 2017 06:06:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DFFA45FBD8 for ; Sun, 18 Jun 2017 06:06:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DAFB3E00A9 for ; Sun, 18 Jun 2017 06:06:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1606823FFF for ; Sun, 18 Jun 2017 06:06:00 +0000 (UTC) Date: Sun, 18 Jun 2017 06:06:00 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (DRILL-5592) Invalid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 18 Jun 2017 06:06:05 -0000 [ https://issues.apache.org/jira/browse/DRILL-5592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Rogers resolved DRILL-5592. -------------------------------- Resolution: Invalid Fix Version/s: (was: 1.11.0) > Invalid > ------- > > Key: DRILL-5592 > URL: https://issues.apache.org/jira/browse/DRILL-5592 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.8.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > > Drill contains a vector class called {{BitVector}} that, apparently, at one time used bits to indicate the set (i.e. not null) state of a nullable vector. At some point in time, the vector because a byte vector (though it retained the original name.) > It seems some methods were never updated and continue to assume 8 values per byte: > {code} > private int getSizeFromCount(int valueCount) { > return (int) Math.ceil(valueCount / 8.0); > } > @Override > public int getValueCapacity() { > return (int) Math.min((long)Integer.MAX_VALUE, data.capacity() * 8L); > } > private int getByteIndex(int index) { > return (int) Math.floor(index / 8.0); > } > {code} > As a result of this old code, certain other methods don't work as expected: > {code} > @Override > public void allocateNew(int valueCount) { > final int size = getSizeFromCount(valueCount); > allocateBytes(size); > } > {code} > The bug causes the above to allocate room for only 1/8 the values expected. While the mistake is benign, {setSafe}} will have to do three unnecessary doublings to compensate for the error. -- This message was sent by Atlassian JIRA (v6.4.14#64029)