Closed stephaniech97 closed 4 years ago
Totals | |
---|---|
Change from base Build 381: | 0.2% |
Covered Lines: | 1068 |
Relevant Lines: | 1288 |
Did you check what the intended behaviour in the SPARQL spec is? Does this PR conform to this?
https://en.wikibooks.org/wiki/SPARQL/Expressions_and_Functions#COUNT,_MIN,_MAX,_AVG_and_SUM Here was mentioned that "The functions COUNT, MIN, MAX, AVG, and SUM can only be used as Aggregate functions." So when further going into the aggregate functions "https://en.wikibooks.org/wiki/SPARQL/Aggregate_functions" they defined it in the following way "MIN, MAX: the minimum or maximum value of all elements, respectively. This works for all value types; numbers are sorted numerically, strings and other types lexically." This is why I chose to accept all types. If different types however are compared, i chose to throw an error.
If different types however are compared, i chose to throw an error.
The "chose" in this sentence makes me suspect that it's not spec-compliant. Can you find any mentions in the spec on what should happen when different types are compared? Maybe you can try with other SPARQL engines to see what happens there?
https://github.com/comunica/comunica/issues/673