|
@@ -0,0 +1,34 @@
|
|
|
+/*##############################################################################
|
|
|
+
|
|
|
+ HPCC SYSTEMS software Copyright (C) 2016 HPCC Systems®.
|
|
|
+
|
|
|
+ Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
+ you may not use this file except in compliance with the License.
|
|
|
+ You may obtain a copy of the License at
|
|
|
+
|
|
|
+ http://www.apache.org/licenses/LICENSE-2.0
|
|
|
+
|
|
|
+ Unless required by applicable law or agreed to in writing, software
|
|
|
+ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
+ See the License for the specific language governing permissions and
|
|
|
+ limitations under the License.
|
|
|
+############################################################################## */
|
|
|
+
|
|
|
+r := { unsigned id, string s };
|
|
|
+
|
|
|
+r mkR(unsigned i) := TRANSFORM
|
|
|
+ SELF.id := i;
|
|
|
+ SELF.s := (STRING)HASH64(i);
|
|
|
+END;
|
|
|
+
|
|
|
+ds1 := dataset(10, mkR(COUNTER));
|
|
|
+
|
|
|
+ds1 t(ds1 l, ds1 r) := TRANSFORM,SKIP(l.id = 5)
|
|
|
+ SELF.id := l.id * r.id;
|
|
|
+ SELF.s := '';
|
|
|
+END;
|
|
|
+
|
|
|
+j := JOIN(ds1, ds1, LEFT.id = RIGHT.id AND LEFT.s[1..*] = RIGHT.s[1..*], t(LEFT, RIGHT), ATMOST(LEFT.s[1..*]=RIGHT.s[1..*],100), LOCAL);
|
|
|
+
|
|
|
+output(TABLE(j,{count(group)}), NAMED('ROWCOUNT'));
|