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

changing statement corresponding to alias after explain , then doing dump gives incorrect result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.8.1
    • None
    • None

    Description

      grunt> a = load '/tmp/t2.txt' as (str:chararray, num1:int, alph : chararray);
      grunt> dump a;
      (ABC,1,a)
      (ABC,1,b)
      (ABC,1,a)
      (ABC,2,b)
      (DEF,1,d)
      (XYZ,1,x)
      
      grunt> c = foreach b  generate group.str, group.$1, COUNT(a.alph) ;          
      grunt> dump c; -- gives correct results
      (ABC,1,3)
      (ABC,2,1)
      (DEF,1,1)
      (XYZ,1,1)
      
      /* but dumping c after following steps gives incorrect results */
      
      grunt> c = foreach b  generate group.$0 , (CHARARRAY)group.$1;                                                                                 
      grunt> explain c;
      ...
      ...
      grunt> c = foreach b  generate group.str, group.$1, COUNT(a.alph) ;
      grunt> dump c;             
      (ABC,1,0)
      (ABC,2,0)
      (DEF,1,0)
      (XYZ,1,0)
      
      

      Attachments

        1. PIG-1776.1.patch
          4 kB
          Thejas Nair

        Activity

          People

            thejas Thejas Nair
            thejas Thejas Nair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: