Changeset: 3ee6c9d194f6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ee6c9d194f6 Modified Files: monetdb5/optimizer/opt_joinpath.mx Branch: Dec2011 Log Message:
ALGjoinPath: refined fix for bug 2965 (type check) While algebra.join() allows only joins on equal types, and opt_joinpath only recognizes joins on equal types, algebra.joinpath() did allow joins on equal storage types. With this checkin, also algebra.joinpath() allows only joins on equal types. This should make test monetdb5/tests/BugTracker/Tests/joinpath-loop.Bug-2965 work as intended also with 32-bit OIDs. The test tries to trigger a type mismatch exception with algebra.joinpath() by tyring to join int with oid. This attempt failed, i.e., the exception was not triggered, with 32-bit OIDs, as 32-bit OIDs have the same storage type as (32-bit) int. Cf., http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=42715:298eda2b30da&module=monetdb5 http://monetdb.cwi.nl/testweb/tests/42715:298eda2b30da/GNU-Darwin-i386-propcheck/monetdb5/mTests/tests/BugTracker/joinpath-loop.Bug-2965.out.diff.html diffs (14 lines): diff --git a/monetdb5/optimizer/opt_joinpath.mx b/monetdb5/optimizer/opt_joinpath.mx --- a/monetdb5/optimizer/opt_joinpath.mx +++ b/monetdb5/optimizer/opt_joinpath.mx @@ -667,7 +667,9 @@ ALGjoinPath(Client cntxt, MalBlkPtr mb, bid = (int *) getArgReference(stk, pci, i); b = BATdescriptor(*bid); if ( b && top ) { - if (TYPEerror(joins[top-1]->ttype, b->htype) ) { + if ( !(joins[top-1]->ttype == b->htype) && + !(joins[top-1]->ttype == TYPE_void && b->htype == TYPE_oid) && + !(joins[top-1]->ttype == TYPE_oid && b->htype == TYPE_void) ) { b= NULL; error = 1; } _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
