You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/06 23:16:20 UTC
[jira] [Commented] (DRILL-3178) csv reader should allow newlines
inside quotes
[ https://issues.apache.org/jira/browse/DRILL-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15553523#comment-15553523 ]
ASF GitHub Bot commented on DRILL-3178:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/593#discussion_r82303872
--- Diff: exec/java-exec/src/test/resources/store/text/WithQuotedCrLf.tbl ---
@@ -0,0 +1,6 @@
+"a
+1"|a|a
+a|"a
+2"|a
+a|a|"a
+3"
--- End diff --
Is there an issue with git converting Windows-style newlines (\r\n) into Unix-style (\n) when this file is checked in & out? Will that mess up the test? Should the test generate this file to handle this particular special case?
> csv reader should allow newlines inside quotes
> -----------------------------------------------
>
> Key: DRILL-3178
> URL: https://issues.apache.org/jira/browse/DRILL-3178
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Text & CSV
> Affects Versions: 1.0.0
> Environment: Ubuntu Trusty 14.04.2 LTS
> Reporter: Neal McBurnett
> Assignee: F Méthot
> Fix For: Future
>
> Attachments: drill-3178.patch
>
>
> When reading a csv file which contains newlines within quoted strings, e.g. via
> select * from dfs.`/tmp/q.csv`;
> Drill 1.0 says:
> Error: SYSTEM ERROR: com.univocity.parsers.common.TextParsingException: Error processing input: Cannot use newline character within quoted string
> But many tools produce csv files with newlines in quoted strings. Drill should be able to handle them.
> Workaround: the csvquote program (https://github.com/dbro/csvquote) can encode embedded commas and newlines, and even decode them later if desired.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)