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 F3A3F200CBE for ; Thu, 22 Jun 2017 19:15:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F231C160BD3; Thu, 22 Jun 2017 17:15: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 48A6F160BE7 for ; Thu, 22 Jun 2017 19:15:05 +0200 (CEST) Received: (qmail 14284 invoked by uid 500); 22 Jun 2017 17:15: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 14263 invoked by uid 99); 22 Jun 2017 17:15:03 -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; Thu, 22 Jun 2017 17:15: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 EFF5BC0311 for ; Thu, 22 Jun 2017 17:15:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, 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 HsOeD2s0Jm5J for ; Thu, 22 Jun 2017 17:15:01 +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 3C2545FAE1 for ; Thu, 22 Jun 2017 17:15: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 7E1C0E0933 for ; Thu, 22 Jun 2017 17:15: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 366AF21942 for ; Thu, 22 Jun 2017 17:15:00 +0000 (UTC) Date: Thu, 22 Jun 2017 17:15:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5518) Roll-up of a number of test framework enhancements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 22 Jun 2017 17:15:06 -0000 [ https://issues.apache.org/jira/browse/DRILL-5518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059704#comment-16059704 ] ASF GitHub Bot commented on DRILL-5518: --------------------------------------- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/851#discussion_r123567643 --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/impl/TupleReaderImpl.java --- @@ -101,8 +88,61 @@ public String getAsString(int colIndex) { return "\"" + colReader.getString() + "\""; case DECIMAL: return colReader.getDecimal().toPlainString(); + case ARRAY: + return getArrayAsString(colReader.array()); default: throw new IllegalArgumentException("Unsupported type " + colReader.valueType()); } } + + private String bytesToString(byte[] value) { + StringBuilder buf = new StringBuilder() + .append("["); + int len = Math.min(value.length, 20); + for (int i = 0; i < len; i++) { + if (i > 0) { + buf.append(", "); + } + buf.append((int) value[i]); + } + if (value.length > len) { + buf.append("..."); + } + buf.append("]"); + return buf.toString(); + } + + private String getArrayAsString(ArrayReader array) { + StringBuilder buf = new StringBuilder(); + buf.append("["); + for (int i = 0; i < array.size(); i++) { + if (i > 0) { + buf.append( ", " ); + } + switch (array.valueType()) { --- End diff -- Fixed. > Roll-up of a number of test framework enhancements > -------------------------------------------------- > > Key: DRILL-5518 > URL: https://issues.apache.org/jira/browse/DRILL-5518 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.11.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > Priority: Minor > Fix For: 1.11.0 > > > Recent development work identified a number of minor enhancements to the "sub-operator" unit tests: > * Create a {{SubOperatorTest}} base class to do routine setup and shutdown. > * Additional methods to simplify creating complex schemas with field widths. > * Define a test workspace with plugin-specific options (as for the CSV storage plugin) > * When verifying row sets, add methods to verify and release just the "actual" batch in addition to the existing method for verify and free both the actual and expected batches. -- This message was sent by Atlassian JIRA (v6.4.14#64029)