Dear all,

I want to simply create an aggregate function that for the moment need not
run on a cluster. It only needs to run on a single machine.
I tried the following

   - I created 2 descriptors ScalarSTUnionAggregateDescriptor[1] and
   STUnionAggregateDescriptor[2]
   - Then added those to the BuiltinFunctions[3] and named the scalar
   descriptor as st-union with arity 1 and the other descriptor as
   agg-st-union with arity 1.
   - And added these  functions to the FunctionCollection[4] using the temp
   field

This hasn't worked.

Can someone please guide me with the minimal classes that needs to be
created and the naming conventions that needs to be used?  And where to add
in these classes in BuiltinFunctions and FunctionCollection?

I am asking for help again and again (really begging) because it is the
most unclear task I have been trying to do. If I can finally get this done
I certainly hope to write a comprehensive documentation so that future
*remote* developers won't fall into the same trouble of figuring out "how
to properly write an aggregate function?"

I only want it to work locally at first. Not about distributed settings.
Please help.

Thank you.

Sincerely,

Riyafa

[1]
https://github.com/riyafa/asterixdb/blob/0b1cdd8090fff82026401ce399383965baefd620/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/scalar/ScalarSTUnionAggregateDescriptor.java

[2]
https://github.com/riyafa/asterixdb/blob/0b1cdd8090fff82026401ce399383965baefd620/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/STUnionAggregateDescriptor.java

[3]
https://github.com/riyafa/asterixdb/blob/0b1cdd8090fff82026401ce399383965baefd620/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java

[4]
https://github.com/riyafa/asterixdb/blob/d99fd65d897cea12e5df5449390238e4a05fa151/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionCollection.java

Reply via email to