Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-24516

PROCESS in a child query on Thor may give incorrect results

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.10.6
    • Fix Version/s: 7.10.12
    • Component/s: Thor
    • Labels:
      None

      Description

      The code bellow got incorrect result when it's run on thor(multiple nodes) cluster. However the result is expected when it's run on hthor.

      nested := RECORD
        STRING fname;
        INTEGER age;
        INTEGER income;
      END;
       
      Layout:=record
        integer uid;
        DATASET(nested) info;
      end;
      
      inds := DATASET([
         {1,[{'FRED',21,1100},{'HELLEN',1,1400},{'JOHN',38,1300},{'JOHN',40,1200}]},
         {2,[{'FRED',10,2100},{'HELLEN',5,2400},{'JACK',30,2200},{'KATE',8,2300}]},
         {3,[{'TIM',35,3000}]}
        ],Layout);
      
      groupedDs := GROUP(distribute(inds, HASH(UID)),UID, LOCAL, ALL); 
      
      results := RECORD
        INTEGER UID;
        DATASET(nested) info;
        DATASET(nested) info1;
      END;
      
      results trans(inds r) := TRANSFORM
        sortedds := SORT(r.info, -income,-fname,-age);
        localrec := { nested payload, INTEGER recno };
        processformat := PROJECT(sortedds, TRANSFORM(localrec, SELF.recno := COUNTER, SELF.payload:=LEFT, SELF:=[]));
      
        nested processit(localrec rec, INTEGER c) := TRANSFORM
          p := PROCESS(processformat, rec, TRANSFORM(localrec, SELF:=RIGHT), TRANSFORM(localrec, SELF:=RIGHT));
          SELF := p[rec.recno].payload;
        END;
        SELF.info1 := PROJECT(processformat, processit(LEFT, COUNTER));    
        SELF := r;  
      END;
      
      Res0 := PROJECT(groupedDs, trans(LEFT));
      Res0; 
      

        Attachments

          Activity

            People

            • Assignee:
              jakesmith Jake Smith
              Reporter:
              schen shawn chen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: