Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, Wikidata-Query-Service. Herald added subscribers: PokestarFan, Aklapper. Herald added a project: Discovery. |
TASK DESCRIPTION
The following query (link) results in an exception:
SELECT (COUNT(*) AS ?a) (COUNT(?x) AS ?b) (?b/?a AS ?r) {}
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719) at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742) at com.bigdata.rdf.sparql.ast.StaticAnalysis.gatherVarsToMaterialize(StaticAnalysis.java:2058) at com.bigdata.rdf.sparql.ast.StaticAnalysis.gatherVarsToMaterialize(StaticAnalysis.java:2009) at com.bigdata.rdf.sparql.ast.eval.AST2BOpUtility.addAggregation(AST2BOpUtility.java:4679) at com.bigdata.rdf.sparql.ast.AST2BOpUtility.convertQueryBaseWithScopedVars(AST2BOpUtility.java:534) at com.bigdata.rdf.sparql.ast.eval.AST2BOpUtility.convert(AST2BOpUtility.java:287) at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.optimizeQuery(ASTEvalHelper.java:426) …I think the query is legal, according to SPARQL, because GROUP BY is not a requirement for using aggregates (“By default a solution set consists of a single group, containing all solutions.”). If you remove the last projection (?b/?a AS ?r), it works.
Here’s the non-reduced query where I found the error: ratio of mandatory constraints
SELECT (COUNT(*) AS ?total) (COUNT(?status) AS ?mandatory) (?mandatory/?total AS ?ratio) WHERE { ?property p:P2302 ?statement. OPTIONAL { ?statement pq:P2316 ?status. } }
TASK DETAIL
EMAIL PREFERENCES
To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Smalyshev, Lucas_Werkmeister_WMDE, PokestarFan, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
Cc: Aklapper, Smalyshev, Lucas_Werkmeister_WMDE, PokestarFan, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs