-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
normalizeQuery() produces invalid SPARQL #53
Comments
Maybe not related, but for the Map view the following query fails because of the 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()
qlever-ui/backend/static/js/helper.js
Lines 26 to 33 in 1ad9df5
<
(for example aFILTER
query using comparators)#
appears in a string literalThere might be other cases I have missed.
The text was updated successfully, but these errors were encountered: