hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olga Natkovich (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-85) Unable to specify CTRL-A as a delimiter for the PigStorage function
Date Fri, 16 May 2008 22:29:55 GMT

    [ https://issues.apache.org/jira/browse/PIG-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597636#action_12597636
] 

Olga Natkovich commented on PIG-85:
-----------------------------------

I added the following unit test to TestStore:

public void testDelimiter() throws IOException{
        System.out.println("Temp files: " + tmpFile1 + ", " + tmpFile2);
        pigServer.registerQuery("A = load " + fileName + ";");
        pigServer.store("A", tmpFile1, "PigStorage('\u0001')");
        pigServer.registerQuery("B = load " + tmpFile1 + "using PigStorage('\u0001');");
        pigServer.registerQuery("C = foreach B generate $0, $1;");
        pigServer.store("C", tmpFile2);
        pigServer.registerQuery("E = load " + tmpFile2 + ";");
        Iterator<Tuple> iter  = pigServer.openIterator("E");
        int i =0;
        while (iter.hasNext()){
            Tuple t = iter.next();
            assertEquals(t.getAtomField(0).numval().intValue(),i);
            assertEquals(t.getAtomField(1).numval().intValue(),i);
            i++;
        }
    }

With the latest patch, it works in local mode but fails in M-R mode. Will attach test outut
in a second.

> Unable to specify CTRL-A as a delimiter for the PigStorage function
> -------------------------------------------------------------------
>
>                 Key: PIG-85
>                 URL: https://issues.apache.org/jira/browse/PIG-85
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Anand Murugappan
>         Attachments: PIG_85_escaping_parameters.patch, PIG_85_v2.patch
>
>
> A PIG command like - 
> store abc into 'abc' using PigStorage('\x01');
>  does not recognize hat the user is requesting the data to by ^A separated. Instead the
data that is stored is literally separated by the string '\x01'. 
> Neither does punching in ^A directly through the editor, nor do any other strings like
\u0001 help. 
> Using a ^A directly through the editor complains about it being an invalid XML character
and bails out. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message