pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Noguchi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2975) TestTypedMap.testOrderBy failing with incorrect result
Date Thu, 18 Oct 2012 21:46:04 GMT

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

Koji Noguchi commented on PIG-2975:
-----------------------------------

bq. Result incorrect (when order-by used). [0.11 and trunk]

Reading the code, I was able to come up with incorrect result case in 0.10. 
It's probably rare since the type has to be unknown. Any Datatype that has less than 2 bytes
of header size in BinInterSedes.java can hit this issue.

{noformat}
$ pig -version
USING: /grid/0/gs/pig/current
Apache Pig version 0.10.1.0.1206081058 (r1348169) 

$ cat pig-2975-mixed.pig
a = load 'pig-2975-mixed1.txt' as (a0:chararray, a1:chararray);
b = load 'pig-2975-mixed2.txt' as (b0:int);
y = union a,b;
z = order y by $0;
dump z;
$ cat pig-2975-mixed1.txt
a       b
b       c
d       e
$ cat pig-2975-mixed2.txt
0
1
0
1
{noformat}
                
> TestTypedMap.testOrderBy failing with incorrect result 
> -------------------------------------------------------
>
>                 Key: PIG-2975
>                 URL: https://issues.apache.org/jira/browse/PIG-2975
>             Project: Pig
>          Issue Type: Sub-task
>    Affects Versions: 0.11
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Blocker
>             Fix For: 0.11
>
>         Attachments: PIG-2975-0_jco.patch, pig-2975-trunk_v01.txt, pig-2975-trunk_v02-broken.txt
>
>
> Looked at 
> {noformat}
> junit.framework.AssertionFailedError
>     at org.apache.pig.test.TestTypedMap.testOrderBy(TestTypedMap.java:352)
> {noformat}
> This looks like a valid test case failing with incorrect result.
> {noformat}
> % cat test/orderby.txt
> [key#1,key9#23]
> [key#3,key3#2]
> [key#22]
> % cat test/orderby.pig
> a = load 'test/orderby.txt' as (m:[]);
> b = foreach a generate m#'key' as b0;
> dump b;
> c = order b by b0;
> dump c;
> % java ... org.apache.pig.Main    -x local test/orderby.pig 
> [dump b]
> (1)
> (3)
> (22)
> ...
> [dump c]
> (1)
> (1)
> (22)
> %
> where did the '(3)' go?
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message