GH-5626 N-ary aggregate function implementation#5628
GH-5626 N-ary aggregate function implementation#5628nk2IsHere wants to merge 1 commit intoeclipse-rdf4j:mainfrom
Conversation
|
I moved this to target develop. I believe the conflicts are my fault. |
7422e3f to
3fb90d8
Compare
...luation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/iterator/GroupIterator.java
Outdated
Show resolved
Hide resolved
...luation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/iterator/GroupIterator.java
Outdated
Show resolved
Hide resolved
3fb90d8 to
a998c55
Compare
|
@nk2IsHere Can you take a look at the following review by codex and see if you think that any of this is valid and if anything needs to be fixed? N-ary registry selection is arity-based, so 1-arg n-ary functions can’t runWhy it matters: A function registered only in the n-ary registry but invoked with one argument will parse (parser checks n-ary registry), then fail at evaluation with “Unknown aggregate function” because Missing arity validation allows zero-argument aggregates and can throw at evaluation timeWhy it matters: DISTINCT semantics for n-ary aggregates are underspecified and likely incorrectWhy it matters: DISTINCT is implemented via |
a998c55 to
748fa28
Compare
|
Points 2 and 3 are now covered in the code. Point 1 is not covered as it is intended for NAry functions to not cover single argument cases |
|
@hmottestad can we get this merged? :) |
|
Can you take a look at #5707 and see if the fixes I've introduced are correct? |
GitHub issue resolved: #5626
Briefly describe the changes proposed in this PR:
This PR adds support for custom aggregate functions with multiple arguments. It adds new factory and type for it (
CustomAggregateNAryFunctionRegistry,AggregateNArgFunction) and extends SPARQL parser to support such functions. As a consequence, minor changes toAggregateFunctionCallwere done too with addition ofAbstractNAryAggregateOperator. I've tried to introduce no breaking changes and only extend the support as an opt-in feature.PR Author Checklist (see the contributor guidelines for more details):
mvn process-resourcesto format from the command line)