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 713CD200CEB for ; Sat, 12 Aug 2017 21:12:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6FB38164DFD; Sat, 12 Aug 2017 19:12:23 +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 AC710164DFC for ; Sat, 12 Aug 2017 21:12:22 +0200 (CEST) Received: (qmail 51750 invoked by uid 500); 12 Aug 2017 19:12:21 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 51737 invoked by uid 99); 12 Aug 2017 19:12:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Aug 2017 19:12:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4ADE6F3216; Sat, 12 Aug 2017 19:12:19 +0000 (UTC) From: paul-rogers To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #901: DRILL-5709: Provide a value vector method to conver... Content-Type: text/plain Message-Id: <20170812191220.4ADE6F3216@git1-us-west.apache.org> Date: Sat, 12 Aug 2017 19:12:19 +0000 (UTC) archived-at: Sat, 12 Aug 2017 19:12:23 -0000 Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/901#discussion_r132824835 --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/BaseValueVector.java --- @@ -133,5 +134,21 @@ public static boolean checkBufRefs(final ValueVector vv) { public BufferAllocator getAllocator() { return allocator; } + + public static void fillBitsVector(UInt1Vector bits, int valueCount) { + + // Create a new bits vector, all values non-null + + bits.allocateNew(valueCount); + UInt1Vector.Mutator bitsMutator = bits.getMutator(); + for (int i = 0; i < valueCount; i++) { + bitsMutator.set(i, 1); + } + } --- End diff -- Fixed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---