hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santhosh Srinivasan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-797) Limit with ORDER BY producing wrong results
Date Wed, 17 Jun 2009 17:48:07 GMT

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

Santhosh Srinivasan commented on PIG-797:
-----------------------------------------

Review Comments:

Index: src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPackage.java

This else part of the code needs to be clone.inner = null. If super.clone is taking care of
it then the else part is not required at all.

{code}
+        if (inner!=null)
+        {
+            clone.inner = new boolean[inner.length];
+            for (int i = 0; i < inner.length; i++) {
+                clone.inner[i] = inner[i];
+            }
         }
+        else
+            inner = null;{code}

The rest of the code looks fine.

> Limit with ORDER BY producing wrong results
> -------------------------------------------
>
>                 Key: PIG-797
>                 URL: https://issues.apache.org/jira/browse/PIG-797
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Olga Natkovich
>            Assignee: Daniel Dai
>             Fix For: 0.3.0
>
>         Attachments: PIG-797-2.patch, PIG-797.patch
>
>
> Query:
> A = load 'studenttab10k' as (name, age, gpa);
> B = group A by name;
> C = foreach B generate group, SUM(A.gpa) as rev;
> D = order C by rev;
> E = limit D 10;
> dump E;
> Output:
> (alice king,31.7)
> (alice laertes,26.450000000000003)
> (alice thompson,25.869999999999997)
> (alice van buren,23.59)
> (bob allen,19.900000000000002)
> (bob ichabod,29.0)
> (bob king,28.459999999999994)
> (bob miller,10.28)
> (bob underhill,28.139999999999997)
> (bob van buren,25.990000000000002)

-- 
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