Skip to content
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

Subquery leads to error #351

Closed
joka921 opened this issue Oct 12, 2020 · 2 comments
Closed

Subquery leads to error #351

joka921 opened this issue Oct 12, 2020 · 2 comments

Comments

@joka921
Copy link
Member

joka921 commented Oct 12, 2020

Suspicion 1 : The names of the variables are not correctly propagated
Suspicion 2 : I made some really bad error in the query.

PREFIX schema: <http://schema.org/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> SELECT ?o WHERE { ?qleverautocomplintermediate <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o . { SELECT ?qleverautocomplintermediate ?horse WHERE { ?horse wdt:P31 ?qleverautocomplintermediate . } } } LIMIT 1

Exception: BAD QUERY (Could not find a suitable execution tree. Likely cause: Queries that require joins of the full index with itself are not supported at the moment.; in /app/src/engine/QueryPlanner.cpp, line 2213, function std::vector > QueryPlanner::fillDpTab(const QueryPlanner::TripleGraph&, const std::vector&, const std::vector >&))

@hannahbast
Copy link
Member

@joka921 Surprisingly, this query still fails after so many years. Here is a simpler variant with the same problem:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?rdftype WHERE {
  ?type rdf:type ?rdftype .
  { SELECT ?type ?subject WHERE { ?subject wdt:P31 ?type } }
}

https://qlever.cs.uni-freiburg.de/wikidata/nAe24n

@hannahbast
Copy link
Member

This has been fixed a while ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants