Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2035

Macro expansion doesn't handle multiple expansions of same macro inside another macro

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.9.0
    • impl
    • None
    • Reviewed

    Description

      Here is the use case:

      define test ( in, out, x ) returns c { 
          a = load '$in' as (name, age, gpa);
          b = group a by gpa;
          $c = foreach b generate group, COUNT(a.$x);
          store $c into '$out';
      };
      
      define test2( in, out ) returns x { 
          $x = test( '$in', '$out', 'name' );
          $x = test( '$in', '$out.1', 'age' );
          $x = test( '$in', '$out.2', 'gpa' );
      };
      
      x = test2('studenttab10k', 'myoutput');
      

      Attachments

        1. PIG-2035_1.patch
          4 kB
          Richard Ding

        Activity

          People

            rding Richard Ding
            rding Richard Ding
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: