Andy Seaborne created JENA-817: ---------------------------------- Summary: SUM(?a) {empty} is error but SUM( DISTINCT?a) {empty} is value zero. Key: JENA-817 URL: https://issues.apache.org/jira/browse/JENA-817 Project: Apache Jena Issue Type: Bug Components: ARQ Affects Versions: Jena 2.12.1 Reporter: Andy Seaborne Assignee: Andy Seaborne Fix For: Jena 2.12.2
They can't both be right! The fix is to make sum(empty) zero. Looks like the code use to do that but was left is a debugging state. In SQL, sum(empty) is NULL. In SPARQL 1.1, sec 18.5.1.3: Sum(S) = "0"^^xsd:integer when card[S] = 0 so it is zero. -- This message was sent by Atlassian JIRA (v6.3.4#6332)