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

pig parser complain same value passed to macro when expanding macro

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.12.0
    • None
    • parser
    • None

    Description

      PIG_2247 add the same arguments detecting before passed to macro, but cause the following problems

       
      define simple_macro(in_relation, min_gpa, max_gpa) returns c {
                        b = filter $in_relation by gpa >= $min_gpa;
                        $c = foreach b generate age, name;}
      
      a = load 'sample.txt';
      b = simple_macro(a, 100, 100);
      

      when launch in pig, it complain

      ERROR org.apache.pig.Main - ERROR 1200: <file abc.pig.substituted, line 7>
       Cannot expand macro 'simple_macro'. Reason:  Duplicated arguments names are 
       passed in macro: number of arguments: 3 number of distinct arguments: 2
      

      it seems passing the same value to different paramter also not allowed

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              abacus Huo Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: