Changeset: 1e2808a8e416 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e2808a8e416 Modified Files: pathfinder/compiler/algebra/opt/opt_complex.c pathfinder/compiler/algebra/prop/prop_dom.c pathfinder/compiler/sql/lalg2sql.brg Branch: Feb2010 Log Message:
Various small bugfixes (in pf property inference, optimizations & SQL code generation). diffs (63 lines): diff -r a7a0e0845e56 -r 1e2808a8e416 pathfinder/compiler/algebra/opt/opt_complex.c --- a/pathfinder/compiler/algebra/opt/opt_complex.c Tue Jul 06 07:29:54 2010 +0200 +++ b/pathfinder/compiler/algebra/opt/opt_complex.c Tue Jul 06 15:32:06 2010 +0200 @@ -2118,20 +2118,21 @@ for (unsigned int i = 0; i < schema.count; i++) schema.items[i].name = PFord_order_col_at (p->sem.sort.sortby, i); - if (PFprop_ckey (p->prop, schema)) { - *p = *PFla_rowrank ( - L(p), - p->sem.sort.res, - p->sem.sort.sortby); - modified = true; - break; - } + if (PFprop_ckey (p->prop, schema)) { + *p = *PFla_rowrank ( + L(p), + p->sem.sort.res, + p->sem.sort.sortby); + modified = true; + break; + } } /* Replace the rownumber operator by a projection if only its value distribution (keys) are required instead of its real values. */ if (!PFprop_req_value_col (p->prop, p->sem.sort.res) && + !p->sem.sort.part && PFord_count (p->sem.sort.sortby) == 1 && PFprop_key (p->prop, PFord_order_col_at (p->sem.sort.sortby, 0))) { diff -r a7a0e0845e56 -r 1e2808a8e416 pathfinder/compiler/algebra/prop/prop_dom.c --- a/pathfinder/compiler/algebra/prop/prop_dom.c Tue Jul 06 07:29:54 2010 +0200 +++ b/pathfinder/compiler/algebra/prop/prop_dom.c Tue Jul 06 15:32:06 2010 +0200 @@ -907,9 +907,11 @@ L(n)->schema.items[i].name), dom); - add_disjdom (dom, - PFprop_dom (R(n)->prop, - L(n)->schema.items[i].name)); + /* we can only infer the disjointness for a single column */ + if (n->schema.count == 1) + add_disjdom (dom, + PFprop_dom (R(n)->prop, + L(n)->schema.items[i].name)); } break; diff -r a7a0e0845e56 -r 1e2808a8e416 pathfinder/compiler/sql/lalg2sql.brg --- a/pathfinder/compiler/sql/lalg2sql.brg Tue Jul 06 07:29:54 2010 +0200 +++ b/pathfinder/compiler/sql/lalg2sql.brg Tue Jul 06 15:32:06 2010 +0200 @@ -4078,7 +4078,7 @@ } /* In case the column did not exist in the column list already ... */ - if (!found) + if (!found && !IS_LITERAL(expr)) /* ... extend the group by list. */ groupbylist = column_list (groupbylist, expr); } break; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list