Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2097218DBE for ; Wed, 23 Sep 2015 16:24:05 +0000 (UTC) Received: (qmail 19337 invoked by uid 500); 23 Sep 2015 16:24:04 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 19229 invoked by uid 500); 23 Sep 2015 16:24:04 -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 18944 invoked by uid 99); 23 Sep 2015 16:24:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 16:24:04 +0000 Date: Wed, 23 Sep 2015 16:24:04 +0000 (UTC) From: "Sean Hsuan-Yi Chu (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (DRILL-3795) TextReader can't read .tsv file contains multiple double quotes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Hsuan-Yi Chu resolved DRILL-3795. -------------------------------------- Resolution: Not A Problem The input is not valid. Let's take the second field in the first row as an example. (""another with quote"") The outermost pair of " denotes that they are surrounding a field. Thus, any " sitting inside this field has to escape with another ". So we should rewrite that field as """another with quote""". > TextReader can't read .tsv file contains multiple double quotes > --------------------------------------------------------------- > > Key: DRILL-3795 > URL: https://issues.apache.org/jira/browse/DRILL-3795 > Project: Apache Drill > Issue Type: Bug > Components: Storage - Text & CSV > Affects Versions: 1.2.0 > Reporter: Chun Chang > Assignee: Sean Hsuan-Yi Chu > Attachments: drill-3795.tsv > > > commit_id: 69c73af54ac3d15b8e7c21e8a3c35b4a62ebc844 > I have a simple tab delimitated file contains multiple double quoted text: > {noformat} > another no quote ""another with quote"" > ""another with double quotes"" no quotes > {noformat} > This cause the following error: > {noformat} > 0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select columns[0], columns[1] from dfs.tmp.`drill-3718.tsv`; > Error: SYSTEM ERROR: TextParsingException: Error processing input: Cannot use newline character within quoted string, line=2, char=61. Content parsed: [ ] > Fragment 0:0 > [Error Id: c631eccc-038c-4d61-bda8-e7037c3677e8 on 10.10.30.166:31010] (state=,code=0) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)