You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Mário Sérgio Fujikawa Ferreira (JIRA)" <ji...@apache.org> on 2018/03/07 14:38:00 UTC
[jira] [Comment Edited] (PIG-2557) CSVExcelStorage save : empty
quotes "" becomes 4 quotes """". This should become a null field.
[ https://issues.apache.org/jira/browse/PIG-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389635#comment-16389635 ]
Mário Sérgio Fujikawa Ferreira edited comment on PIG-2557 at 3/7/18 2:37 PM:
-----------------------------------------------------------------------------
I can confirm the issue with Apache Pig 0.16.0 from Hortonworks HDP 2.5.3.
$ cat /tmp/csvexcelstorage_test.csv
"A",B,"",,C
$ pig -x local
grunt> REGISTER /usr/hdp/current/pig-client/lib/piggybank.jar;
grunt> A = LOAD '/tmp/csvexcelstorage_test.csv' USING org.apache.pig.piggybank.storage.CSVExcelStorage() AS ( first: chararray, second: chararray, third: chararray, fourth: chararray, fifth: chararray);
grunt> dump A
(A,B,",,C)
The third column should be dumped as null instead of " (double quote). It could only be a double quote if csvexcelstorage_test.csv had
"A",B,"""",,C
was (Author: lioux):
I can confirm the issue with Apache Pig 0.16.0 from Hortonworks HDP 2.5.3.
$ cat /tmp/csvexcelstorage_test.csv
"A",B,"",,C
# pig -x local
grunt> REGISTER /usr/hdp/current/pig-client/lib/piggybank.jar;
grunt> A = LOAD '/tmp/csvexcelstorage_test.csv' USING org.apache.pig.piggybank.storage.CSVExcelStorage() AS ( first: chararray, second: chararray, third: chararray, fourth: chararray, fifth: chararray);
grunt> dump A
(A,B,",,C)
The third column should be dumped as null instead of " (double quote). It could only be a double quote if csvexcelstorage_test.csv had
"A",B,"""",,C
> CSVExcelStorage save : empty quotes "" becomes 4 quotes """". This should become a null field.
> -----------------------------------------------------------------------------------------------
>
> Key: PIG-2557
> URL: https://issues.apache.org/jira/browse/PIG-2557
> Project: Pig
> Issue Type: Bug
> Components: piggybank
> Affects Versions: 0.9.1
> Reporter: Peter Welch
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)