Changeset: ede5ba39df74 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ede5ba39df74 Modified Files: pathfinder/compiler/sql/lalg2sql.brg Branch: default Log Message:
bugfix: for max and min over boolean values, we don't need to wrap the value into a case statement diffs (19 lines): diff -r 940b0253df18 -r ede5ba39df74 pathfinder/compiler/sql/lalg2sql.brg --- a/pathfinder/compiler/sql/lalg2sql.brg Sat May 22 15:06:31 2010 +0200 +++ b/pathfinder/compiler/sql/lalg2sql.brg Tue May 25 16:54:48 2010 +0200 @@ -729,7 +729,14 @@ /* we have a different strategy when our item is boolean */ if (col->sem.column.name->ty == aat_bln) n = (n->kind == sql_column_name || - n->kind == sql_lit_int)? + n->kind == sql_lit_int || + /* in case we have a max or min over a boolean + * value, we don't wrap it into another case + * statement, since in case of a condition + * we dump the statement before the aggregate + * is used. */ + n->kind == sql_max || + n->kind == sql_min)? n: case_ (when (n, TRUE_INT), else_ (FALSE_INT)); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list