From issues-return-50770-archive-asf-public=cust-asf.ponee.io@drill.apache.org Wed Mar 14 01:45:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2F43218067B for ; Wed, 14 Mar 2018 01:45:06 +0100 (CET) Received: (qmail 24230 invoked by uid 500); 14 Mar 2018 00:45: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 24211 invoked by uid 99); 14 Mar 2018 00:45:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2018 00:45:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 437C3C0529 for ; Wed, 14 Mar 2018 00:45:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id jcA1q6J4_MVQ for ; Wed, 14 Mar 2018 00:45:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 358105F19B for ; Wed, 14 Mar 2018 00:45:01 +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 6A5D4E030E for ; Wed, 14 Mar 2018 00:45:00 +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 288532148D for ; Wed, 14 Mar 2018 00:45:00 +0000 (UTC) Date: Wed, 14 Mar 2018 00:45:00 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-6234) Improve Documentation of VariableWidthVector Behavior MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-6234?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1639= 7921#comment-16397921 ]=20 Paul Rogers commented on DRILL-6234: ------------------------------------ [~timothyfarkas], not pointless at all. You are going though the Drill Univ= ersity of Hard Knocks. If we could do this over, vector value count should = be maintained in the vector for ever write. No reason to keep it in applica= tion code (most operators) or the vector writers (new code). The only reason we don't do it the "right way" is that historical decision = to base vectors on network buffers. If we ever=C2=A0get a chance to replace {{DrillBuf}} with fixed-width buffe= rs chained together (or some other implementation), we should certainly rev= isit this issue. > Improve Documentation of VariableWidthVector Behavior > ----------------------------------------------------- > > Key: DRILL-6234 > URL: https://issues.apache.org/jira/browse/DRILL-6234 > Project: Apache Drill > Issue Type: Improvement > Reporter: Timothy Farkas > Assignee: Timothy Farkas > Priority: Major > > Doing the following will throw an Index out of bounds exception. > {code} > final VarCharVector vector =3D new VarCharVector(field, allocator); > vector.allocateNew(); > vector.getMutator().setValueCount(100); > {code} > The expected behavior is to resize the array appropriately. If an index i= s uninitialized you should not call get for that index. > {code} > =09at org.apache.drill.exec.memory.BoundsChecking.checkIndex(BoundsChecki= ng.java:80) > =09at org.apache.drill.exec.memory.BoundsChecking.lengthCheck(BoundsCheck= ing.java:86) > =09at io.netty.buffer.DrillBuf.chk(DrillBuf.java:114) > =09at io.netty.buffer.DrillBuf.getInt(DrillBuf.java:484) > =09at org.apache.drill.exec.vector.UInt4Vector$Accessor.get(UInt4Vector.j= ava:432) > =09at org.apache.drill.exec.vector.VarCharVector$Mutator.setValueCount(Va= rCharVector.java:729) > =09at org.apache.drill.exec.vector.VarCharVectorTest.testExpandingNonEmpt= yVectorSetValueCount(VarCharVectorTest.java:97) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at java.lang.reflect.Method.invoke(Method.java:606) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at java.lang.reflect.Method.invoke(Method.java:606) > =09at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4= IdeaTestRunner.java:68) > =09at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunner= WithArgs(IdeaTestRunner.java:47) > =09at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart= (JUnitStarter.java:242) > =09at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java= :70) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)