Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22582/src/server
Modified Files:
sql_optimize.mx
Log Message:
fixed optimizer bug, also fix order of joins which join more complex
columns.
Index: sql_optimize.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_optimize.mx,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- sql_optimize.mx 12 May 2007 22:24:10 -0000 1.79
+++ sql_optimize.mx 23 May 2007 23:00:25 -0000 1.80
@@ -782,17 +782,16 @@
for(jn = ejoins->h; jn; jn = jn->next) {
stmt *j = jn->data;
- if (!STMT_BAT(j->op1.stval->type))
- continue;
assert(j->op2.stval->type==st_reverse);
- if (!STMT_BAT(j->op2.stval->op1.stval->type))
- continue;
if (j->t == join->h && j->type == st_join) {
stmt *jh = stmt_dup(j->op2.stval->op1.stval);
stmt *jt = stmt_reverse(stmt_dup(j->op1.stval));
jn->data = stmt_join(jh, jt,
swap_compare((comp_type)j->flag));
stmt_destroy(j);
- } else if (j->t == join->h && j->type == st_reljoin) {
+ } else if (STMT_BAT(j->op1.stval->type) &&
+ STMT_BAT(j->op2.stval->op1.stval->type) &&
+ j->t == join->h &&
+ j->type == st_reljoin) {
list *l1 = list_dup(j->op1.lval,
(fdup)&stmt_dup);
list *l2 = list_dup(j->op2.lval,
(fdup)&stmt_dup);
jn->data = stmt_reljoin2(l2,l1);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins