Changeset: ff42b3855ee0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ff42b3855ee0
Modified Files:
        monetdb5/modules/mal/pipeline.c
Branch: pp_hashjoin
Log Message:

keep inputs ordered


diffs (26 lines):

diff --git a/monetdb5/modules/mal/pipeline.c b/monetdb5/modules/mal/pipeline.c
--- a/monetdb5/modules/mal/pipeline.c
+++ b/monetdb5/modules/mal/pipeline.c
@@ -522,9 +522,22 @@ PPclaim(Client cntxt, MalBlkPtr mb, MalS
 
        BAT *b = BATdescriptor(rb);
        if (b) {
+               bool sync = false;
+               Pipeline *p = MT_thread_getdata();
+               int nr = -1;
+               if (p) {
+                       nr = p->seqnr;
+                       if (nr >= 0) {
+                               bool done = 0;
+                               pipeline_get_token(p, 7, nr, &done);
+                               sync = true;
+                       }
+               }
                struct pipeline_resultset *rs = (struct 
pipeline_resultset*)b->pl_io;
                *res = ATOMIC_ADD(&rs->claimed, cnt);
                BBPreclaim(b);
+               if (sync)
+                       pipeline_pass_token(p, 7, nr);
        }
        return MAL_SUCCEED;
 }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to