user defnined function problem

Niall Rooney N.Rooney at
Mon Jan 6 17:32:06 CET 2014


I am making the following adjustment to the user defined function template files .

I am using MonetDB-11.15.15 built from source on Ubuntu 12.04.
I have added to the following files in the ./sql/backends/monet5/UDF directory as shown:


create function sumProb(prob1 double, prob2 double)
returns double external name udf.sumProb;

module udf;

command sumProb(prob1:dbl,prob2:dbl):dbl
address UDFSumProb
comment "sum two probabilities";


str UDFSumProb(dbl * res, dbl * prob1, dbl  * prob2)
            *res =  *prob1 + *prob2;
            return MAL_SUCCEED;


udf_export str UDFSumProb(dbl * res, dbl * prob1, dbl  * prob2);

I did a configure/make/make install and tried the following call in mclient:

declare a, b,c double; set a= 0.1; set b= 0.2; select c=jsdistance(a,b);

and get the error:

TypeException:user.s2_1[8]:'udf.sumprob' undefined in: _12:any := udf.sumprob(_8:dbl, _11:dbl)
program contains errors

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the developers-list mailing list