Open patrickbr opened 12 months ago
Maybe not related, but for the Map view the following query fails because of the MINUS
clause I guess?
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wiki: <http://en.wikipedia.org/wiki/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?s ?loc {
?s p:P31 ?stmt . ?stmt ps:P31 ?type . ?type wdt:P279+ wd:Q1220959 . # wd:Q16831714 .
?s wdt:P625 ?loc .
MINUS {?stmt wdt:P582 ?end}
}
The error message is
{
"exception": "Invalid SPARQL query: Token \"}\": mismatched input '}' expecting ",
"metadata": {
"line": 1,
"positionInLine": 489,
"query": "PREFIX p: PREFIX ps: PREFIX wiki: PREFIX wdt: PREFIX wd: PREFIX rdf: PREFIX rdfs: select distinct ?s ?loc { ?s p:P31 ?stmt . ?stmt ps:P31 ?type . ?type wdt:P279+ wd:Q1220959 . MINUS { ?stmt wdt:P582 ?end } ?s wdt:P625 ?loc }} LIMIT 18446744073709551615",
"startIndex": 489,
"stopIndex": 489
},
"query": "PREFIX p: PREFIX ps: PREFIX wiki: PREFIX wdt: PREFIX wd: PREFIX rdf: PREFIX rdfs: select distinct ?s ?loc { ?s p:P31 ?stmt . ?stmt ps:P31 ?type . ?type wdt:P279+ wd:Q1220959 . MINUS { ?stmt wdt:P582 ?end } ?s wdt:P625 ?loc }} LIMIT 18446744073709551615",
"resultsize": 0,
"status": "ERROR",
"time": {
"computeResult": 0,
"total": 0
}
}
it looks like the intermediate query being used to render the map is
PREFIX p: PREFIX ps: PREFIX wiki: PREFIX wdt: PREFIX wd: PREFIX rdf: PREFIX rdfs:
select distinct ?s ?loc { ?s p:P31 ?stmt . ?stmt ps:P31 ?type . ?type wdt:P279+ wd:Q1220959 . MINUS { ?stmt wdt:P582 ?end } ?s wdt:P625 ?loc }} LIMIT 18446744073709551615
not sure what happens to the prefix part here but I guess the cause of the issue is the redundant curly bracket at the end.
Should now be fixed with cd8a019c. This version is however not live, yet.
The new version is now live.
The method
normalizeQuery()
https://github.com/ad-freiburg/qlever-ui/blob/1ad9df580008cf470c30b2d586001f9dc10642e6/backend/static/js/helper.js#L26-L33 fails to return valid SPARQL in the following cases:<
(for example aFILTER
query using comparators)#
appears in a string literalThere might be other cases I have missed.