Hi, we are moving towards pure columns, which means that the head should be of type :oid. command bat.new(nme:str):bat[:oid,:any_1] address CMDBATderivedByName; comment Localize a bat by name and produce a clone. pattern bat.new(b:bat[:oid,:any_1],size:lng):bat[:oid,:any_1] address CMDBATnewDerived; pattern bat.new(b:bat[:oid,:any_1]):bat[:oid,:any_1] address CMDBATnewDerived; pattern bat.new(ht:oid,tt:any_1,size:lng):bat[:oid,:any_1] address CMDBATnew; comment Creates a new BAT and allocate space. pattern bat.new(ht:oid,tt:any_1,size:int):bat[:oid,:any_1] address CMDBATnewint; comment Creates a new BAT with sufficient space. pattern bat.new(ht:oid,tt:any_1):bat[:oid,:any_1] address CMDBATnew; comment Creates a new empty transient BAT, with head- and tail-types as indicated. regards, Martin On 6/26/13 9:10 AM, hlfwm hlfwm wrote:
i defined a user defined function "binarycopy",when i use my function, there is error: sql>select binarycopy('starid','1111',1); TypeException:user.s1_1[5]:'svom.binarycopy' undefined in: _9:any := svom.binarycopy(_6:str, _7:str, _8:int) program contains errors
i want to debug the error with mal, there also some error:
[svomhpc@localhost /home/data1]$>mclient -l mal -u monetdb -d mydb4 password: Welcome to mclient, the MonetDB interactive terminal (unreleased) Type \q to quit, \? for a list of available commands mal> mal> mal>function test(i:int):str; mal>io.print(i); mal>i:=i*2; mal>b:=bat.new(:int,:int); mal>bat.insert(b,1,i); mal>io.print(b); mal>return test:= "ok"; mal>end test; MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = end test; ERROR = !TypeException:user.test[3]:'bat.new' undefined in: b:any := bat.new(_5:int, _6:int) !TypeException:user.test[4]:'bat.insert' undefined in: _7:any := bat.insert(b:any, _8:int, i:int) mal>
could anyone tell me how to debug my function ,please?
Thanks!
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list