Changeset: ce2435a46eaf for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce2435a46eaf Modified Files: sql/backends/monet5/BDCC/bdcc.c sql/backends/monet5/BDCC/bdcc.h sql/backends/monet5/BDCC/bdcc.mal Branch: BDCC Log Message:
bdcc.batisnotnil is a sullied hack made to test the nullity of the candidate bats sl and sr given as arguments to filter functions. nil:bat has bat id 0, which is not seen as nil by calc.isnil. diffs (63 lines): diff --git a/sql/backends/monet5/BDCC/bdcc.c b/sql/backends/monet5/BDCC/bdcc.c --- a/sql/backends/monet5/BDCC/bdcc.c +++ b/sql/backends/monet5/BDCC/bdcc.c @@ -107,3 +107,9 @@ bdcc_export char * BDCCremap (bat * res, return MAL_SUCCEED; } + +bdcc_export char * BDCCbatisnotnil (bit * res, int * b) { + *res = *b == 0 || *b == bat_nil ? 0 : 1; + + return MAL_SUCCEED; +} diff --git a/sql/backends/monet5/BDCC/bdcc.h b/sql/backends/monet5/BDCC/bdcc.h --- a/sql/backends/monet5/BDCC/bdcc.h +++ b/sql/backends/monet5/BDCC/bdcc.h @@ -15,5 +15,6 @@ #endif bdcc_export char * BDCCremap (bat * res, bat * b, bat * oldMasks, bat * newMasks); +bdcc_export char * BDCCbatisnotnil (bit * res, int * b); #endif diff --git a/sql/backends/monet5/BDCC/bdcc.mal b/sql/backends/monet5/BDCC/bdcc.mal --- a/sql/backends/monet5/BDCC/bdcc.mal +++ b/sql/backends/monet5/BDCC/bdcc.mal @@ -39,7 +39,10 @@ function ints(b:bat[:oid, :str]):bat[:oi exit (h, t); return res; -end ints; +end ints; + +command batisnotnil(b:bat[:any_1,:any_2]):bit +address BDCCbatisnotnil; function remapequivjoin(x:bat[:oid,:int], xOldMasksStr:str, xNewMasksStr:str, y:bat[:oid,:int], yOldMasksStr:str, yNewMasksStr:str) (l:bat[:oid,:oid],r:bat[:oid,:oid]); @@ -67,16 +70,20 @@ function remapequivsubjoin(x:bat[:oid,:i sl:bat[:oid,:oid], sr:bat[:oid,:oid], nil_matches:bit,estimate:lng) (l:bat[:oid,:oid],r:bat[:oid,:oid]); xsel := x; + + slNotNil := batisnotnil(sl); - barrier sl; + barrier slNotNil; xsel := algebra.leftfetchjoin(sl, x); - exit sl; + exit slNotNil; ysel := y; - barrier sr; + srNotNil := batisnotnil(sr); + + barrier srNotNil; ysel := algebra.leftfetchjoin(sr, y); - exit sr; + exit srNotNil; (l,r) := remapequivjoin(xsel, xOldMasksStr, xNewMasksStr, ysel, yOldMasksStr, yNewMasksStr); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list