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

Unbound variable in SELECT clause should give empty column #329

Closed
hannahbast opened this issue Apr 21, 2020 · 0 comments · Fixed by #330
Closed

Unbound variable in SELECT clause should give empty column #329

hannahbast opened this issue Apr 21, 2020 · 0 comments · Fixed by #330
Assignees

Comments

@hannahbast
Copy link
Member

Consider the following query, where the ?x in the SELECT clause is deliberately unbound:

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?x ?award_received WHERE {
  wd:Q873 wdt:P166 ?award_received
}

The correct result table would have an empty first column (because ?x is unbound) and second column containing all the awards (wdt:P166) of Mery Streep (wd:Q873). The Wikidata Query Service indeed outputs this.

QLever outputs the awards in the first column and leaves the second column empty. More generally, in a SELECT clause with x bound variable and y unbound variables, QLever (wrongly) produces a table with the x left columns filled with results.

I hope that this is not hard to fix. I need it for the autocompletion templates (if the prefix for the current predicate or entity is empty, we don't need to compute the aliases and then the alias variable is unbound and the respective column should simply be empty then).

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

Successfully merging a pull request may close this issue.

2 participants