Niels Nes wrote:
Hello,
Firs question:
b.select(0@0, oid(b.count() - 3)).mark(0@0).reverse()
What is the meaning of such MIL code line?
I translate it to MAL like this: cnt := aggr.count(base);
On Mon, Dec 03, 2007 at 10:09:02PM +0100, Romulo Goncalves wrote: base ? b probably?
cnt := cnt - 3;
better calc.-(cnt,3)
oid := calc.oid(cnt);
Your asigning to a type (not sure if this is allowed/possible in m5) In m4 its silently ignored but later you'll get the type number when you use oid. Best is to rename your variable to for example id.
sel := algebra.select(b, 0@0, id);
#c0 := b.select(0@0, oid(b.count() - 3)).mark(0@0).reverse(); cnt := aggr.count(alg); cnt := calc.-(cnt,3); id := calc.oid(cnt); sel := algebra.select(b, 0@0, id); mrk := algebra.markT(sel, 0@0); c0 := bat.reverse(mrk); I did like this and I still get: [goncalve@amelia MonetDB5]$ ../../bin/mserver5 # MonetDB server v5.3.0, based on kernel v1.21.0 # Serving database 'demo' # Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked # Copyright (c) 1993-2007 CWI, all rights reserved # Visit http://monetdb.cwi.nl/ for further information #warning: please don't forget to set your vault key! #(see /ufs/goncalve/scratch/MonetDB/MonetDB5/etc/monetdb5.conf) !TypeException:user.str2qgrams[26]:'algebra.select' undefined in: sel:any := algebra.select(b:bat[:str,:void], _27:oid, id:oid)
Third question: !SyntaxException:parseError: res := [+](c1, c2); !SyntaxException:parseError: ^operator expected batcalc.+(c1,c2); So for all the functions inside [<func>] I should use batcalc.<func> , right?
Regards, Romulo