[ 
https://issues.apache.org/jira/browse/PIG-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koji Noguchi updated PIG-2975:
------------------------------

    Attachment: 
pig-2975-trunk_v05-BinInterSedesRawComparatorAndlightweight-withtest2.txt

bq. statically import assertEquals()
done.

bq. "compareTwoObjects" is a bit misleading,
Renamed to compareTwoObjectsAsNullableBytesWritables.

bq. a few more comments could be helpful.
Added.

Also, added one more test case testLongByteArrays to make sure I'm setting the 
offset/length right.

One test I don't have an answer on.

{noformat}
118   @Test119   public void testDifferentType() throws Exception {
120      assertTrue("Integer 9999 and Long 9999 considered equal",
121         compareTwoObjectsAsNullableBytesWritables(new Integer(9999), new 
Long(9999)) != 0 );
122 }
{noformat}

when comparing Integer(9999) and Long(9999) as unknown type, should they be 
considered same ? or different? 

Inside BinInterSedesTupleRawComparator, it's the latter.  Before, it was former 
(since the bug was skipping the datatype header).
                
> 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-0_jco-v2.patch, 
> pig-2975-trunk_v01.txt, pig-2975-trunk_v02-broken.txt, 
> pig-2975-trunk_v03-unionapproach.txt, pig-2975-trunk_v04-purerawcompare.txt, 
> pig-2975-trunk_v05-BinInterSedesRawComparatorAndlightweight-withouttest.txt, 
> pig-2975-trunk_v05-BinInterSedesRawComparatorAndlightweight-withtest2.txt, 
> pig-2975-trunk_v05-BinInterSedesRawComparatorAndlightweight-withtest.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

Reply via email to