Quellcode durchsuchen

Merge branch 'master' into candidate-6.0.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman vor 9 Jahren
Ursprung
Commit
21043574dd

+ 8 - 1
ecl/hthor/hthor.cpp

@@ -5171,7 +5171,11 @@ const void * CHThorSelfJoinActivity::nextRow()
                 if(helper.match(lhs, rhs))
                 {
                     const void * ret = joinRecords(lhs, rhs, ++joinCounter, NULL);
-                    return ret;
+                    if(ret)
+                    {
+                        processed++;
+                        return ret;
+                    }
                 }
             }
         }
@@ -5598,7 +5602,10 @@ const void * CHThorLookupJoinActivity::nextRowJoin()
                         break;
                     ret = joinRecords(left, right, ++joinCounter);
                     if(ret)
+                    {
+                        processed++;
                         break;
+                    }
                 }
                 right = getRightNext();
                 ret = NULL;

+ 34 - 0
ecl/regress/issue13336.ecl

@@ -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'));

+ 9 - 2
roxie/ccd/ccdserver.cpp

@@ -17741,14 +17741,18 @@ public:
                         eof = true;
                     }
                 }
-                
+
                 if (group.isItem(rightIndex))
                 {
                     const void * rhs = group.item(rightIndex++);
                     if(helper.match(lhs, rhs))
                     {
                         const void * ret = joinRecords(lhs, rhs, ++joinCounter, NULL);
-                        return ret;
+                        if(ret)
+                        {
+                            processed++;
+                            return ret;
+                        }
                     }
                 }
             }
@@ -18390,7 +18394,10 @@ private:
                             break;
                         ret = joinRecords(left, right, ++joinCounter);
                         if(ret)
+                        {
+                            processed++;
                             break;
+                        }
                     }
                     right = getRightNext();
                     ret = NULL;

+ 34 - 0
testing/regress/ecl/issue13336.ecl

@@ -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'));

+ 3 - 0
testing/regress/ecl/key/issue13336.xml

@@ -0,0 +1,3 @@
+<Dataset name='ROWCOUNT'>
+ <Row><_unnamed_cnt_1>9</_unnamed_cnt_1></Row>
+</Dataset>