Hi,
I am implementing group_concat in MAL language, this is what i have sofar,
CREATE AGGREGATE group_concat(val STRING)
returns STRING
external name "udf"."group_concat";
module udf;
function group_concat(b:bat[:oid,:str]):str;
r:="";
length:=aggr.count(b);
barrier (h,t):= iterator.new(b);
r:=r+t;
redo (h,t) := iterator.next(b);
exit (h,t);
return r;
end group_concat;
when i use group_concat in group by, i get this error:
TypeException:user.s1_1[105]:'udf.subgroup_concat' undefined in: _168:bat[:oid,:
str] := udf.subgroup_concat(_167:bat[:oid,:str], _153:bat[:oid,:oid], r1_153:bat
[:oid,:oid], _169:bit)
program contains errors
any help or reference to implement an aggregate function?
Thank you.