Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: None
    • Labels:
      None

      Description

      This script works:

      A = load 'test' using PigStorage(':') as (name: chararray, age: int, gpa: float);
      B = group A by age;
      C = foreach B

      { D = filter A by gpa > 2.5; E = order A by name; F = A.age; describe F; G = distinct F; generate group, COUNT(D), MAX (E.name), MIN(G.$0);}

      dump C;

      This one produces an error:

      A = load 'test' using PigStorage(':') as (name: chararray, age: int, gpa: float);
      B = group A by age;
      C = foreach B

      { D = filter A by gpa > 2.5; E = order A by name; F = A.age; G = distinct F; generate group, COUNT(D), MAX (E.name), MIN(G);}

      dump C;

      Notice the difference in how MIN is passed the data.

      1. PIG-973.patch
        10 kB
        Richard Ding

        Activity

        Hide
        Richard Ding added a comment -

        This following script also produces an error:

        A = load 'input' as (id:int, g:bag{t:tuple(u:int)});;
        B = foreach A generate id, SUM(g); ;
        dump B;
        

        The problem appears to be with the patch of PIG-315, which only pushed the exception from compile-time to runtime for the script below:

        a = load 'studenttab10k' as (name:chararray, age:int, gpa:double);
        b = foreach a generate (long)age as age, (int)gpa as gpa;
        c = foreach b generate SUM(age), SUM(gpa);
        dump c; 
        

        Actually, one can argue that this is an invalid script – the input type of the eval function SUM is a bag of numbers, not a number. So it should be caught at compile-time (by the parser if posible).

        Show
        Richard Ding added a comment - This following script also produces an error: A = load 'input' as (id: int , g:bag{t:tuple(u: int )});; B = foreach A generate id, SUM(g); ; dump B; The problem appears to be with the patch of PIG-315 , which only pushed the exception from compile-time to runtime for the script below: a = load 'studenttab10k' as (name:chararray, age: int , gpa: double ); b = foreach a generate ( long )age as age, ( int )gpa as gpa; c = foreach b generate SUM(age), SUM(gpa); dump c; Actually, one can argue that this is an invalid script – the input type of the eval function SUM is a bag of numbers, not a number. So it should be caught at compile-time (by the parser if posible).
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12427943/PIG-973.patch
        against trunk revision 889870.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 7 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12427943/PIG-973.patch against trunk revision 889870. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/122/console This message is automatically generated.
        Hide
        Olga Natkovich added a comment -

        +1 on the changes. I will be committing the patch shortly

        Show
        Olga Natkovich added a comment - +1 on the changes. I will be committing the patch shortly
        Hide
        Olga Natkovich added a comment -

        patch committed. thanks, Richard

        Show
        Olga Natkovich added a comment - patch committed. thanks, Richard

          People

          • Assignee:
            Richard Ding
            Reporter:
            Olga Natkovich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development