[Monetdb-developers] Questions about MIL....
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); cnt := cnt - 3; oid := calc.oid(cnt); sel := algebra.select(b, 0@0, oid); mrk := bat.markT(sel,0@0); c0 := bat.reverse(mrk);
Is the order correct? Because I am getting the following type Error: !TypeException:user.str2qgrams[26]:'algebra.select' undefined in: sel:any := algebra.select(b:bat[:str,:void], _31:oid, oid:oid)
Second question: Which function I should call for: b.reverse().seqbase(0@0);
In MAL I did rev := bat.reverse(b); base := bat.setBase(rev,0@0);
But the bat.setBase is comment in bat5.mal, so what function should I use?
Third question: !SyntaxException:parseError: res := [+](c1, c2); !SyntaxException:parseError: ^operator expected
How to resolve this error? I do not have any clue what is this about.
Regards, Romulo
On Mon, Dec 03, 2007 at 10:09:02PM +0100, Romulo Goncalves 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);
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);
mrk := bat.markT(sel,0@0); c0 := bat.reverse(mrk);
Is the order correct? Because I am getting the following type Error: !TypeException:user.str2qgrams[26]:'algebra.select' undefined in: sel:any := algebra.select(b:bat[:str,:void], _31:oid, oid:oid)
Second question: Which function I should call for: b.reverse().seqbase(0@0);
In MAL I did rev := bat.reverse(b); base := bat.setBase(rev,0@0);
But the bat.setBase is comment in bat5.mal, so what function should I use?
markH
Third question: !SyntaxException:parseError: res := [+](c1, c2); !SyntaxException:parseError: ^operator expected
batcalc.+(c1,c2);
How to resolve this error? I do not have any clue what is this about.
Regards, Romulo
Niels
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
Niels Nes wrote:
On Mon, Dec 03, 2007 at 10:09:02PM +0100, Romulo Goncalves 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);
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
On Tue, Dec 04, 2007 at 05:20:31PM +0100, Romulo Goncalves wrote:
#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)
^^^^ ^^^ ^^^ MAL strict typing (void != oid)? What does b's tail look like? Is it VOID-NIL (i.e., with NIL seqbase) or non-materialized dense OID ("VID") (i.e., with non-NIL seqbase)?
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?
Right --- provided the is an explicit specific batcalc.<func> implementation in MAL for <func> --- in MIL the multiplexed [<func>] is generic for all scalar function <func>.
Stefan
Stefan Manegold wrote:
On Tue, Dec 04, 2007 at 05:20:31PM +0100, Romulo Goncalves wrote:
#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)
^^^^ ^^^ ^^^
MAL strict typing (void != oid)? What does b's tail look like? Is it VOID-NIL (i.e., with NIL seqbase) or non-materialized dense OID ("VID") (i.e., with non-NIL seqbase)?
The problem was the bat creation I did # var b := bat(str,void,len+4); b := bat.new(:str,:void,len);
and it should be: b := bat.new(:str,:oid,len); ^^^
Regards, Romulo
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?
Right --- provided the is an explicit specific batcalc.<func> implementation in MAL for <func> --- in MIL the multiplexed [<func>] is generic for all scalar function <func>.
Stefan
On Tue, Dec 04, 2007 at 05:38:08PM +0100, Romulo Goncalves wrote:
!TypeException:user.str2qgrams[26]:'algebra.select' undefined in: sel:any := algebra.select(b:bat[:str,:void], _27:oid, id:oid)
^^^^ ^^^ ^^^
MAL strict typing (void != oid)? What does b's tail look like? Is it VOID-NIL (i.e., with NIL seqbase) or non-materialized dense OID ("VID") (i.e., with non-NIL seqbase)?
The problem was the bat creation I did # var b := bat(str,void,len+4); b := bat.new(:str,:void,len);
and it should be: b := bat.new(:str,:oid,len); ^^^
well, depends what you want: the first gives you non-materialized ("virtual") dense OIDs (once you set the seqbase to some non-NIL OID value); the second gives you materialized OIDs. The above MIL code does the first; I vaguely recall, though, that MAL does not (conveniently) allow to create a VOID-NIL column and then turn it into a "VID" column by setting its seqbase; possibly, MAL hence only allows to create VID columns as view using markH() or markT() --- but not being a MAL expert, I'm more speculating than knowing ...
Stefan
Niels Nes wrote:
On Mon, Dec 03, 2007 at 10:09:02PM +0100, Romulo Goncalves 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);
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)
'oid' is an ordinary variable, if it starts with ':' it becomes a type tag. actually ':oid' introduces a temporary variable of type oid, i.e. ':oid' is equivalent to '_23:oid' for some arbitrary number
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);
mrk := bat.markT(sel,0@0); c0 := bat.reverse(mrk);
Is the order correct? Because I am getting the following type Error: !TypeException:user.str2qgrams[26]:'algebra.select' undefined in: sel:any := algebra.select(b:bat[:str,:void], _31:oid, oid:oid)
Second question: Which function I should call for: b.reverse().seqbase(0@0);
In MAL I did rev := bat.reverse(b); base := bat.setBase(rev,0@0);
But the bat.setBase is comment in bat5.mal, so what function should I use?
markH
setSequenceBase()..... use the MAL appendix to find the functions using a grep on the comments
Third question: !SyntaxException:parseError: res := [+](c1, c2); !SyntaxException:parseError: ^operator expected
batcalc.+(c1,c2);
How to resolve this error? I do not have any clue what is this about.
Regards, Romulo
Niels
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On Tue, Dec 04, 2007 at 08:16:31PM +0100, Martin Kersten wrote:
Second question: Which function I should call for: b.reverse().seqbase(0@0);
In MAL I did rev := bat.reverse(b); base := bat.setBase(rev,0@0);
But the bat.setBase is comment in bat5.mal, so what function should I use?
markH
setSequenceBase()..... use the MAL appendix to find the functions using a grep on the comments
======== # 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/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
a:=bat.new(:void,:int); b:=bat.setSequenceBase(a,0@0);
!TypeException:user.main[1]:'bat.setSequenceBase' undefined in: b:any := bat.setSequenceBase(a:bat[:void,:int], _3:oid)
manual.help("setSequenceBase"); manual.search("setSequenceBase"); bat.se
command bat.setKey(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setAccess(b:bat[:any_1,:any_2],mode:str):bat[:any_1,:any_2] command bat.setAppendMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setReadMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setWriteMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit command bat.setName(b:bat[:any_1,:any_2],s:str):void command bat.setRole(b:bat[:any_1,:any_2],h:str,t:str):void command bat.setColumn(b:bat[:any_1,:any_2],t:str):void command bat.setColumn(b:bat[:any_1,:any_2],h:str,t:str):void command bat.setTransient(b:bat[:any_1,:any_2]):void command bat.setPersistent(b:bat[:any_1,:any_2],f:bit):void command bat.setPersistent(b:bat[:any_1,:any_2]):void command bat.setCold(b:bat[:any_1,:any_1]):void command bat.setHot(b:bat[:any_1,:any_2]):void command bat.setMemoryMap(b:bat[:any_1,:any_2],buns_mode:int,hheap_mode:int,theap_mode:int):bit command bat.setMemoryMap(b:bat[:any_1,:any_2],mode:int):bit command bat.setMemoryAdvise(b:bat[:any_1,:any_2],buns_mode:int,hheap_mode:int,theap_mode:int):bit command bat.setMemoryAdvise(b:bat[:any_1,:any_2],mode:int):bit command bat.setHash(b:bat[:any_1,:any_2],prop:bit):bit pattern bat.setGarbage(b:bat[:any_1,:any_2]):void pattern bat.setBase(b:bat[:any_1,:any_2],c:bat[:any_1,:any_2]...):void command batmtime.seconds(d:bat[:any_1,:date]):bat[:any_1,:int] command batcalc.search(s:bat[:oid,:str],c:bat[:oid,:str]):bat[:oid,:int] command batcalc.search(s:bat[:oid,:str],c:str):bat[:oid,:int]
bat.setS
command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit
bat.setS
command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit
b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _3:oid)
c:=bat.getSequenceBase(a);
!TypeException:user.main[1]:'bat.getSequenceBase' undefined in: c:any := bat.getSequenceBase(a:bat[:void,:int])
manual.help("getSequenceBase");
bat.getSequenceBase
manual.search("getSequenceBase");
command bat.getSequenceBase(b:bat[:oid,:any_1]):oid address BKCgetSequenceBase; #Get the sequence base for the void column of a BAT. ========
Moreover, http://monetdb.cwi.nl/MonetDB/Documentation/Instruction-Summary.html#Instruc... and http://monetdb.cwi.nl/MonetDB/Documentation/Instruction-Help.html list bat.getSequenceBase() and bat.setBase(), but no bat.setSequenceBase(). But:
======== # 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/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
a:=bat.new(:void,:int); b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _3:oid)
manual.search("setBase");
pattern bat.setBase(b:bat[:any_1,:any_2],c:bat[:any_1,:any_2]...):void address CMDsetBase; #Give the non-empty BATs consecutive oid bases
c:=bat.append(a,1); b:=bat.setBase(c,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(c:void, _4:oid)
b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _4:oid)
========
... I'm slightly puzzled ... ?
Stefan
Stefan Manegold wrote:
On Tue, Dec 04, 2007 at 08:16:31PM +0100, Martin Kersten wrote:
Second question: Which function I should call for: b.reverse().seqbase(0@0);
In MAL I did rev := bat.reverse(b); base := bat.setBase(rev,0@0);
But the bat.setBase is comment in bat5.mal, so what function should I use?
markH
setSequenceBase()..... use the MAL appendix to find the functions using a grep on the comments
bat5.mal:#command setSequenceBase( b:bat[:oid,:any_1], base:oid):void This command is comment so it not exist...
Thanks for the explanation Stefan ;)
Regards, Romulo
======== # 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/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
a:=bat.new(:void,:int); b:=bat.setSequenceBase(a,0@0);
!TypeException:user.main[1]:'bat.setSequenceBase' undefined in: b:any := bat.setSequenceBase(a:bat[:void,:int], _3:oid)
manual.help("setSequenceBase"); manual.search("setSequenceBase"); bat.se
command bat.setKey(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setAccess(b:bat[:any_1,:any_2],mode:str):bat[:any_1,:any_2] command bat.setAppendMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setReadMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setWriteMode(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit command bat.setName(b:bat[:any_1,:any_2],s:str):void command bat.setRole(b:bat[:any_1,:any_2],h:str,t:str):void command bat.setColumn(b:bat[:any_1,:any_2],t:str):void command bat.setColumn(b:bat[:any_1,:any_2],h:str,t:str):void command bat.setTransient(b:bat[:any_1,:any_2]):void command bat.setPersistent(b:bat[:any_1,:any_2],f:bit):void command bat.setPersistent(b:bat[:any_1,:any_2]):void command bat.setCold(b:bat[:any_1,:any_1]):void command bat.setHot(b:bat[:any_1,:any_2]):void command bat.setMemoryMap(b:bat[:any_1,:any_2],buns_mode:int,hheap_mode:int,theap_mode:int):bit command bat.setMemoryMap(b:bat[:any_1,:any_2],mode:int):bit command bat.setMemoryAdvise(b:bat[:any_1,:any_2],buns_mode:int,hheap_mode:int,theap_mode:int):bit command bat.setMemoryAdvise(b:bat[:any_1,:any_2],mode:int):bit command bat.setHash(b:bat[:any_1,:any_2],prop:bit):bit pattern bat.setGarbage(b:bat[:any_1,:any_2]):void pattern bat.setBase(b:bat[:any_1,:any_2],c:bat[:any_1,:any_2]...):void command batmtime.seconds(d:bat[:any_1,:date]):bat[:any_1,:int] command batcalc.search(s:bat[:oid,:str],c:bat[:oid,:str]):bat[:oid,:int] command batcalc.search(s:bat[:oid,:str],c:str):bat[:oid,:int]
bat.setS
command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit
bat.setS
command bat.setSet(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] command bat.setSorted(b:bat[:any_1,:any_2]):bit
b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _3:oid)
c:=bat.getSequenceBase(a);
!TypeException:user.main[1]:'bat.getSequenceBase' undefined in: c:any := bat.getSequenceBase(a:bat[:void,:int])
manual.help("getSequenceBase");
bat.getSequenceBase
manual.search("getSequenceBase");
command bat.getSequenceBase(b:bat[:oid,:any_1]):oid address BKCgetSequenceBase;
#Get the sequence base for the void column of a BAT.
Moreover, http://monetdb.cwi.nl/MonetDB/Documentation/Instruction-Summary.html#Instruc... and http://monetdb.cwi.nl/MonetDB/Documentation/Instruction-Help.html list bat.getSequenceBase() and bat.setBase(), but no bat.setSequenceBase(). But:
======== # 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/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
a:=bat.new(:void,:int); b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _3:oid)
manual.search("setBase");
pattern bat.setBase(b:bat[:any_1,:any_2],c:bat[:any_1,:any_2]...):void address CMDsetBase; #Give the non-empty BATs consecutive oid bases
c:=bat.append(a,1); b:=bat.setBase(c,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(c:void, _4:oid)
b:=bat.setBase(a,0@0);
!TypeException:user.main[1]:'bat.setBase' undefined in: b:any := bat.setBase(a:bat[:void,:int], _4:oid)
========
... I'm slightly puzzled ... ?
Stefan
participants (4)
-
Martin Kersten
-
Niels Nes
-
Romulo Goncalves
-
Stefan Manegold