-
Notifications
You must be signed in to change notification settings - Fork 54
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
QLever missing features or unexpected behavior #615
Comments
The SERVICE keyword is not yet supported [reported by @WolfgangFahl on 26.02.2022]: |
Square brackets are not yet supported [reported by @dpriskorn on 25.02.2022]: |
Minor syntax features not yet supported [reported by @WolfgangFahl on 19.02.2022]: https://qlever.cs.uni-freiburg.de/wikidata/BGoE0M Variant of the query that works: https://qlever.cs.uni-freiburg.de/wikidata/VgHqGB |
Currently, only GET queries are supported, not POST [reported by @WolfgangFahl on 19.02.2022]: This is easy to fix and on our list. |
String functions are not yet supported in QLever [reported by @dpriskorn on 28.01.2022]: https://qlever.cs.uni-freiburg.de/wikidata/EnB513 NOTE: The code for supporting functions in SPARQL expressions is all there. It's just a matter of adding more functions. |
String functions not yet implemented [reported by @WolfgangFahl on 28.01.2022]: https://qlever.cs.uni-freiburg.de/wikidata/0fidpY The following equivalent query works: https://qlever.cs.uni-freiburg.de/wikidata/m49coC |
Basic ?s ?p ?o query does not work yet in QLever [reported by @balhoff on 10.12.2021]: https://qlever.cs.uni-freiburg.de/wikidata/VSpbRD NOTE: This is easy to implement and is on our list |
Quick question here, it's hard as a user to see which features are not currently supported if they are all in a single issue. What about using a query label to group all of these issues, but having separate issues for each failed query 'feature'? |
String functions URI and CONCAT not yet supported [reported by @dpriskorn on 15.10.2022]: https://qlever.cs.uni-freiburg.de/wikidata/5sDHUw This variant of the query works: https://qlever.cs.uni-freiburg.de/wikidata/aIbGvo |
@hannahbast |
FILTER with arbitrary expressions not yet supported [reported by @graue70 on 03.09.2021]: https://qlever.cs.uni-freiburg.de/wikidata/Zd77YE NOTE: The code for supporting arbitrary expressions is in place in the meantime, we "only" need to add this feature |
@jeremiahpslewis You are completely right and this issue is not for having a good overview, it's just to give people a chance to add a new query if they encounter one without opening a new issue every time. Having dozens of issues for things which are already on our list is not really helpful. The solution I propose is that I add a page on the Wiki with a list of the features currently not supported (together with an estimate of when they will be supported and how hard it is). |
Do you accept pull requests? What would be a good first issue? 😀 |
I have added more details to #607 and suggest to use named queries for continuous integration. IMHO it would be good to add the name of the query as comment e.g. sparqlquery -qp wikidata.yaml --showQuery -qn HumansWithLibrisEntryAndImageAndMap named query HumansWithLibrisEntryAndImageAndMap # humans with images and maps in swedish national library
# 53142 results in 20.6 seconds on Wikidata Query Service
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?item ?librisuri ?coord (sample(?img) AS ?image) (sample(?map) AS ?map) WHERE {
# humans with a Libris-URI (swedish national library) and a known birthplace
?item wdt:P5587 ?librisid;
wdt:P31 wd:Q5;
wdt:P19 ?birthplace.
# birthplace coordinates
?birthplace wdt:P625 ?coord.
# image of the subject
OPTIONAL {?item wdt:P18 ?img}.
# map of the subject
OPTIONAL {?item wdt:P242 ?map}.
BIND(URI(CONCAT("https://libris.kb.se/katalogisering/",?librisid)) AS ?librisuri)
}
group by ?item ?librisuri ?coord |
@hannahbast Having dozens of issues for things which are already on our list is not really helpful. |
|
@anlam If you want the whole dataset, isn't the right thing to download it from Wikidata: https://dumps.wikimedia.org/wikidatawiki/entities/ ? In principle, you can of course download the whole dataset with |
|
@tuukka Can you provide a complete query? |
Example (should produce 192 nation states, produces 192 empty rows): https://qlever.cs.uni-freiburg.de/wikidata/qphky4 Of course, it's easy to work around by search-and-replace of ?queryVariable with ?resultVariable, but it's a reason why some queries from WDQS don't work directly in QLever. |
Thanks, that looks like one of the many small deviations from the SPARQL 1.1 standard, which we are currently fixing. @Qup42 @joka921 What do you think? As a quick workaround, BIND is your friend and this equivalent query gives you the desired result: https://qlever.cs.uni-freiburg.de/wikidata/HOuTUH |
Here is an example of a "truly tabular" generated query with GROUP_CONCAT that does not seem to work: # truly tabular aggregate query for
# Q2020153:academic conference
# generated by trulytabular.py version 0.2.14 on 2022-07-28T08:27:46.370180
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?academic_conference ?academic_conferenceLabel
(SAMPLE (?country) AS ?country_sample)
(COUNT (?short_name) AS ?short_name_count)
(GROUP_CONCAT (?short_name;SEPARATOR="⇹") AS ?short_name_list)
(COUNT (?title) AS ?title_count)
(GROUP_CONCAT (?title;SEPARATOR="⇹") AS ?title_list)
WHERE {
# instanceof Q2020153:academic conference
?academic_conference wdt:P31 wd:Q2020153.
# label
?academic_conference rdfs:label ?academic_conferenceLabel.
FILTER (LANG(?academic_conferenceLabel) = "en").
# country (P17)
OPTIONAL {
?academic_conference wdt:P17 ?country.
}
# short name (P1813)
OPTIONAL {
?academic_conference wdt:P1813 ?short_name.
}
# title (P1476)
OPTIONAL {
?academic_conference wdt:P1476 ?title.
}
}
GROUP BY ?academic_conference ?academic_conferenceLabel
HAVING (COUNT(?country)=1) |
@WolfgangFahl There are two issues here: QLever's parser currently does not allow |
see https://qlever.cs.uni-freiburg.de/wikidata/zitfWe for coalesce not working |
On can use |
Is there an overview about the current coverage of SPARQL 1.1 features resp. functions. Or maybe just a list of the missing features/functions? From what I can can tell since I tried it in the morning, hash functions are missing. But I'm looking for a list according the SPARQL 1.1 specs, e.g. 7.4.1 Functional Forms
7.4.2 Functions on RDF Terms
Functions on Strings
7.4.4 Functions on Numerics
7.4.5 Functions on Dates and Times
7.4.6 Hash Functions
|
see #1247 and #859 and WDscholia/scholia#2412 how a systematic testing approach could look like. Is there somewhere a list of example queries according to the SPARQL spec that we could pick up? |
There is the SPARQL 1.1 test suite: https://www.w3.org/2009/sparql/docs/tests/summary.html It provides data, query and expected results w.r.t. the standard. |
I saw a query in the QLever "OHM Planet" demo: SELECT ?p ?count ?percent WHERE {
{ SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p }
BIND(100 * ?count / SUM(?count) AS ?percent)
}
ORDER BY DESC(?count) I'm pretty sure this is non-standard SPARQL as aggregate functions are not allowed in a With standard SPARQL it would be a more verbose query like SELECT ?p ?count_p ?percent WHERE {
{ SELECT (COUNT(?s) AS ?count_total) WHERE {?s ?p ?o}}
{ SELECT ?p (COUNT(?p) AS ?count_p) WHERE { ?s ?p ?o } GROUP BY ?p }
BIND(100 * ?count_p / ?count_total AS ?percent)
}
ORDER BY DESC(?count_p) |
Please advise if the following SPARQL expression is on the development roadmap?
If it is not, I would be grateful if you could support it. Having this expression in SPARQL query raises the following error: |
Could you post the full query @tokarenko?
|
in the error message it looks like the subquery has no projection, is this correct? Please show the whole query. Other than that, I think |
I am trying to use qLever with my custom ontology behind a SPARQL federation engine. I am trying to get "1.1.1.1" from the following triple: The query is as follows:
Federation engine queries qLever as follows:
I tried Ontotext GraphDB with the same ontology. It works as expected. So, I assume the query is fine. |
I had a look into the code. |
While the simple s-p-o query works, restricting it to ?s a ?o fails: https://qlever.cs.uni-freiburg.de/wikidata/TqjfBa |
Please note that the https://github.com/WolfgangFahl/snapquery can now happily host the test queries as named parameterized queries. I intend to e.g. give all queries of this tickets names as i already did successfully for the tickets from the wikidata query service short names queries with the help of an LLM to guess the names, description and the like. @joka921 - i also sent you and e-mail recently - it might have ended up in your SPAM filter so it would be great if you get actively in touch. Do you have an official suite of test queries by now or shall we offer one as part of the snapquery project? |
The DESCRIBE keyword is not supported. I have not seen it mentioned anywhere in the issues or in the wiki. |
@agustaf9 Thanks for pointing that out, I have added @WolfgangFahl I missed your last request and reading it now, I am not sure I understand it. Could you provide a bit more context? |
Just a detail: If I understand correctly SELECT (NOW() AS ?now) WHERE {} |
My favorite Wikidata query is not working. Main reason is that qlever assumes that the regex we are trying to match is a static string but, as I understand the spec, it can also be derived from a bound variable. This is probably hard to optimize as the search space opens to potentially >10k or hundreds of thousands of regular expressions with which we want to filter potentially 1bn records.
|
@athalhammer Thanks for the query. Yes, variable However, for your particular query you can simple use
|
Thanks @hannahbast ! Just wanted to verify my perception that this should be supported (at some point) and let you know just in case you were not aware of it. You are right about |
Whenever you encounter a query that you think should work (according to the SPARQL 1.1 standard) but throws an error message or gives an unexpected result, please post it here. Please check whether a similar query has already been posted before.
I will now move various queries from other issues here, so that we don't have one issue per query (which doesn't really help).
The text was updated successfully, but these errors were encountered: