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

NOFOLD causes wrong order of operations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.10.0
    • Component/s: Code Generator
    • Labels:

      Description

      I never use NOFOLD in production code so I have no concerns if this doesn't get addressed, but I thought I'd mention it anyway. When I wrapped an inline dataset with NOFOLD, then did a DISTRIBUTE(ds, random()) followed by a COUNT PROJECT, the project occurred before the distribute causing my results to not be ordered by the counter as expected. Without NOFOLD, the distribute always happened first. And if the distribute was by anything other than random, it also occurred first in those cases as well.

      layout := {
      	unsigned u1 := 0,
      	string1 s1 := 'a',
      };
      
      // without NOFOLD, works as expected
      ds := nofold(dataset([{0},{0},{0},{0}], layout));
      
      ds_dist := distribute(ds, random());
      ds_cnt_project := project(ds_dist,
                                transform(layout,
                                  self.u1 := counter));
      
      // dataset is not in expected order b/c DISTRIBUTE occurs after PROJECT in the graph
      output(ds_cnt_project);
      

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              dustinskaggs Dustin Skaggs
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: