pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Chawla (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-1708) Cross after Limit produces wrong results
Date Fri, 05 Nov 2010 19:06:46 GMT
Cross after Limit produces wrong results

                 Key: PIG-1708
                 URL: https://issues.apache.org/jira/browse/PIG-1708
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Anil Chawla

It seems that the CROSS operation is producing empty or missing results when it involves a
LIMITed alias. For example, this script loads some data and appends the record count to each
row. The LIMIT in this case is unnecessary but is used to demonstrate the issue:

a = load 'bug.txt' using PigStorage(',') as (word1, word2);
b = group a all;
c = foreach b generate COUNT(a) as count;
limit_c = LIMIT c 1;
d = cross a, limit_c;
dump d;

This produces empty results with my simple test data of 4 rows. However, changing it to "d
= cross a, c" produces the correct results. This does not make sense because "c" and "limit_c"
 have the same value.

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

View raw message