Changeset: 98beb9fb9a26 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98beb9fb9a26 Modified Files: pathfinder/compiler/algebra/opt/opt_complex.c pathfinder/compiler/sql/lalg2sql.brg Branch: Jun2010 Log Message:
merged with Jan's bug fixes from Feb2010 diffs (63 lines): diff -r 8554ea7e0ec0 -r 98beb9fb9a26 pathfinder/compiler/algebra/opt/opt_complex.c --- a/pathfinder/compiler/algebra/opt/opt_complex.c Tue Jul 06 16:21:28 2010 +0200 +++ b/pathfinder/compiler/algebra/opt/opt_complex.c Tue Jul 06 16:22:36 2010 +0200 @@ -2147,20 +2147,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 8554ea7e0ec0 -r 98beb9fb9a26 pathfinder/compiler/algebra/prop/prop_dom.c --- a/pathfinder/compiler/algebra/prop/prop_dom.c Tue Jul 06 16:21:28 2010 +0200 +++ b/pathfinder/compiler/algebra/prop/prop_dom.c Tue Jul 06 16:22:36 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 8554ea7e0ec0 -r 98beb9fb9a26 pathfinder/compiler/sql/lalg2sql.brg --- a/pathfinder/compiler/sql/lalg2sql.brg Tue Jul 06 16:21:28 2010 +0200 +++ b/pathfinder/compiler/sql/lalg2sql.brg Tue Jul 06 16:22:36 2010 +0200 @@ -4136,7 +4136,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