Forráskód Böngészése

HPCC-10147 Add comments to examples to indicate the expected errors

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 11 éve
szülő
commit
3181fdf78c
2 módosított fájl, 4 hozzáadás és 1 törlés
  1. 2 0
      ecl/regress/groupjoin1_err.ecl
  2. 2 1
      ecl/regress/groupjoin2_err.ecl

+ 2 - 0
ecl/regress/groupjoin1_err.ecl

@@ -25,6 +25,8 @@ outRec makeOut(namesRec l, namesRec r) := TRANSFORM
     SELF.rname := r.name;
 END;
 
+//Error: RIGHT.name isn't legal becuase you can only group on fields from LEFT
+//Error: LEFT.addr isn't legal because it isn't projected into the output
 j := JOIN(nameDataset, nameDataset, LEFT.addr = RIGHT.addr AND LEFT.name != RIGHT.name, makeOut(LEFT, RIGHT), GROUP(LEFT.name, RIGHT.name, LEFT.addr));
 
 r := TABLE(j, { lname, rname, unsigned cnt := COUNT(GROUP) });

+ 2 - 1
ecl/regress/groupjoin2_err.ecl

@@ -25,7 +25,8 @@ outRec makeOut(namesRec l, namesRec r) := TRANSFORM
     SELF.rname := r.name;
 END;
 
- // This syntax would be preferrable, but requires a new parser to allow the dynamic scoping of the names
+// Error: The expressions referred to in the GROUP are members of LEFT, not the output of the transform.
+// This syntax might be preferrable, but would require a new parser to allow the dynamic scoping of the names
 j := JOIN(nameDataset, nameDataset, LEFT.addr = RIGHT.addr AND LEFT.name != RIGHT.name, makeOut(LEFT, RIGHT), GROUP(lname, rname));
 
 r := TABLE(j, { lname, rname, unsigned cnt := COUNT(GROUP) });