Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv653/src/server

Modified Files:
      Tag: SQL_2-16
        sql_select.mx 
Log Message:
fixing problems with RANK() OVER()
Now correctly uses mark_grp

approved output after the move of mark_grp


Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.175.2.6
retrieving revision 1.175.2.7
diff -u -d -r1.175.2.6 -r1.175.2.7
--- sql_select.mx       30 Mar 2007 13:00:20 -0000      1.175.2.6
+++ sql_select.mx       31 Mar 2007 17:25:37 -0000      1.175.2.7
@@ -1419,10 +1419,14 @@
                        s = first_subset(subset);
                else if (!s)
                        return s;
-               s = stmt_mark(s, 0);
+               if (grp) {
+                       sql_subaggr *a = sql_bind_aggr(sql->session->schema, 
"rownumber", NULL);
+                       s = stmt_aggr(stmt_dup(grp->grp), grp_dup(grp), a);
+               } else {
+                       s = stmt_mark(stmt_reverse(s), 0);
+               }
        } else {
                s = sql_aggrop(sql, scp, window_function, grp, subset, f);
-               return s;
        }
        return s;
 }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to