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 2424E200C7E for ; Tue, 9 May 2017 07:47:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 22CF2160BCA; Tue, 9 May 2017 05:47:25 +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 713CB160BA5 for ; Tue, 9 May 2017 07:47:24 +0200 (CEST) Received: (qmail 87334 invoked by uid 500); 9 May 2017 05:47:08 -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 86762 invoked by uid 99); 9 May 2017 05:47:07 -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; Tue, 09 May 2017 05:47:07 +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 2AC6E1AF954 for ; Tue, 9 May 2017 05:47:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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 aR0o9x3cdWWm for ; Tue, 9 May 2017 05:47:05 +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 284FA60DE1 for ; Tue, 9 May 2017 05:47:05 +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 A70B3E0BE1 for ; Tue, 9 May 2017 05:47:04 +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 30C4D21DF8 for ; Tue, 9 May 2017 05:47:04 +0000 (UTC) Date: Tue, 9 May 2017 05:47:04 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5492) CSV reader does not validate header names, causes nonsense output MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 09 May 2017 05:47:25 -0000 [ https://issues.apache.org/jira/browse/DRILL-5492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002080#comment-16002080 ] Paul Rogers commented on DRILL-5492: ------------------------------------ Could not readily find a way to cause serious harm with this bug, so marked it as minor. > CSV reader does not validate header names, causes nonsense output > ----------------------------------------------------------------- > > Key: DRILL-5492 > URL: https://issues.apache.org/jira/browse/DRILL-5492 > Project: Apache Drill > Issue Type: Bug > Reporter: Paul Rogers > Priority: Minor > > Consider the same test case as in DRILL-5491, but with a slightly different input file: > {code} > ___ > a,b,c > d,e,f > {code} > The underscores represent three spaces: use spaces in the real test. > In this case, the code discussed in DRILL-5491 finds some characters and happily returns the following array: > {code} > [" "] > {code} > The field name of three blanks is returned to the client to produce the following bizarre output: > {code} > 2 row(s): > > a > d > {code} > The blank line is normally the header, but the header here was considered to be three blanks. (In fact, the blanks are actually printed.) > Since the blanks were considered to be a field, the file is assumed to have only one field, so only the first column was returned. > The expected behavior is that spaces are trimmed from field names, so the field name list would be empty and a User Error thrown. (That is, it is confusing to the user why a blank line produces NPE, some produce the {{ExecutionSetupException}} shown in DRILL-5491, and some produce blank headings. Behavior should be consistent. -- This message was sent by Atlassian JIRA (v6.3.15#6346)