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

liyunzhang_intel commented on PIG-5145:
---------------------------------------

[~szita]:  

it is better to change the code like
{code}
@Test
    public void testUDFForwardingLoadCasterWithMultipleParams() throws 
Exception{
        File inputfile = Util.createFile(new String[]{"123","456","789"});

        pig.registerQuery("A = load '"
                + inputfile.toString()
                + "' using PigStorage() as (a1:bytearray);\n");
        pig.registerQuery("B = load '"
                + inputfile.toString()
                + "' using PigStorage() as (b1:bytearray);\n");
        pig.registerQuery("C = join A by a1, B by b1;\n");
        pig.registerQuery("D = FOREACH C GENERATE TOTUPLE(a1,b1) as tupleD;\n");
        pig.registerQuery("E = FOREACH D GENERATE (chararray) tupleD.a1;\n");
        Iterator<Tuple> iter  = pig.openIterator("E");

//        Assert.assertEquals("123", iter.next().get(0));
//        Assert.assertEquals("456", iter.next().get(0));
//        Assert.assertEquals("789", iter.next().get(0));
        String[] expected = new String[] {"123","456","789"};
        Util.checkQueryOutputsAfterSortRecursive(iter, expected,
                
org.apache.pig.newplan.logical.Util.translateSchema(pig.dumpSchema("E")));
    }
{code}

There is a case(TestEvalPipeline#testNestedPlan) to fix this kind of situation 
by adding "order by". This is because we can not use 
Util.checkQueryOutputsAfterSortRecursive to fix that case. 

> fix TestLineageFindRelVisitor unit test failure after PIG-5132
> --------------------------------------------------------------
>
>                 Key: PIG-5145
>                 URL: https://issues.apache.org/jira/browse/PIG-5145
>             Project: Pig
>          Issue Type: Sub-task
>          Components: spark
>            Reporter: liyunzhang_intel
>            Assignee: Adam Szita
>             Fix For: spark-branch
>
>         Attachments: PIG-5145.0.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to