https://www.monetdb.org/bugzilla/show_bug.cgi?id=3978
On Sun, May 1, 2016 at 9:50 PM, Anderson, David B wrote: All, I have been able to create and install my own aggregate UDF
(weightedpercentile), but when I try to execute it via mclient I am getting
the following error: sql>select key, weightedpercentile(a,b) from t group by key;
TypeException:user.s9_1[20]:'udf.subweightedpercentile' undefined in:
X_34:bat[:any,:dbl] :=
udf.subweightedpercentile(X_26:bat[:oid,:dbl],X_33:bat[:oid,:dbl],X_16:bat[:oid,:oid],r1_16:bat[:oid,:oid],true:bit);
program contains errors Does anyone know what I am doing incorrectly? I am at a total loss now. The error is almost identical to the error I get if I try to execute the
corr() aggregate: sql>select key, corr(a,b) from t group by key;
TypeException:user.s10_1[20]:'aggr.subcorr' undefined in:
X_34:bat[:any,:dbl] :=
aggr.subcorr(X_26:bat[:oid,:dbl],X_33:bat[:oid,:dbl],X_16:bat[:oid,:oid],r1_16:bat[:oid,:oid],true:bit);
program contains errors The corr() error is referenced in a recent bug submission (which I can't
find in Bugzilla) If I look in the system function catalog, I see: sql>select * from sys.functions where name like '%weight%'; +------+--------------------+---------------------------------------------------+------+------+------+-------+-------+-------+------+
| id | name | func
| mod | lang | type | side_ | varre | varar | sche |
: : :
: : uage : : effec : s : g : ma_i :
: : :
: : : : t : : : d : +======+====================+===================================================+======+======+======+=======+=======+=======+======+
| 9313 | weightedpercentile | -- weighted percentile
| udf | 1 | 3 | false | false | false | 2000 |
: : : create aggregate weightedpercentile(e1 real,
e2 r : : : : : : : :
: : : eal) returns real
: : : : : : : :
: : : external name
udf.weightedpercentile; : : : : : : :
:
| 9318 | weightedpercentile | -- weighted percentile
| udf | 1 | 3 | false | false | false | 2000 |
: : : create aggregate weightedpercentile(e1
double, e2 : : : : : : : :
: : : double) returns double
: : : : : : : :
: : : external name
udf.weightedpercentile; : : : : : : :
: +------+--------------------+---------------------------------------------------+------+------+------+-------+-------+-------+------+
2 tuples (1.107ms) So my function appears to be installed. I have in (80_udf.sql): -- weighted percentile
create aggregate weightedpercentile(e1 real, e2 real) returns real
external name udf.weightedpercentile; -- weighted percentile
create aggregate weightedpercentile(e1 double, e2 double) returns double
external name udf.weightedpercentile; and in (udf.mal): # BAT MAL signatures
module batudf; command weightedpercentile(one:bat[:oid,:bte],two:bat[:oid,:bte]):lng
address UDFBATweightedpercentile
comment "compute the weighted percentile (bte)" command weightedpercentile(one:bat[:oid,:int],two:bat[:oid,:int]):lng
address UDFBATweightedpercentile
comment "compute the weighted percentile (int)" command weightedpercentile(one:bat[:oid,:lng],two:bat[:oid,:lng]):lng
address UDFBATweightedpercentile
comment "compute the weighted percentile (lng)" _______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list