Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26769/src/backends/monet5
Modified Files:
Tag: Nov2009
sql.mx
Log Message:
fixed order by on grp_rank
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.358.2.12
retrieving revision 1.358.2.13
diff -u -d -r1.358.2.12 -r1.358.2.13
--- sql.mx 15 Nov 2009 18:36:39 -0000 1.358.2.12
+++ sql.mx 15 Nov 2009 21:37:29 -0000 1.358.2.13
@@ -736,8 +736,17 @@
end slave.close;
function batcalc.mark_grp{inline}( b:bat[:oid,:any_1], a:bat[:any_2,:any_3],
g:bat[:oid,:oid]) :bat[:oid,:int];
- x := algebra.mark_grp(a,g,1:oid);
- return mark_grp:= batcalc.int(x);
+ # order based on b
+ bm := algebra.markT(b,0:oid);
+ mb := bat.reverse(bm);
+ ma := algebra.leftfetchjoin(mb, a);
+ aa := bat.mirror(a);
+ maa := algebra.leftfetchjoin(mb, aa);
+ x := algebra.mark_grp(ma,g,1:oid);
+ mg := batcalc.int(x);
+ # restore the order based on a
+ aam := bat.reverse(maa);
+ return mark_grp := algebra.leftfetchjoin(aam, mg);
end batcalc.mark_grp;
function batcalc.mark_grp{inline}( b:bat[:oid,:any_1] ) :bat[:oid,:int];
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins