Hi all,
I'm following the example at [1] to define my own SPARQL function in Stardog. My specific requirement is that I would like that function to be an aggregation function (i.e. to be used over all variable bindings in the projections). The docs say that the class AbstractFunction implements Extensible Value Testing as in [2], but it's not clear to me if that covers custom aggregation functions. My guess is that the answer is no, but when I try this:
>$ ./stardog query myDB "prefix stardog: <tag:stardog:api:> select ((stardog:myAggFunc(?o)) as ?foo) where {?s eg:myProp ?o} group by ?o"
the query is accepted. The function is executed once per binding though, thus not the expected aggregation behaviour, so my question is whether this is intentional or to what extent custom aggregations are supported.
Thanks for you continued support and great job,
Albert