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

If VALUES result set is empty, an exception is thrown #290

Closed
graue70 opened this issue Nov 11, 2019 · 2 comments · Fixed by #309
Closed

If VALUES result set is empty, an exception is thrown #290

graue70 opened this issue Nov 11, 2019 · 2 comments · Fixed by #309

Comments

@graue70
Copy link
Contributor

graue70 commented Nov 11, 2019

The following query yields an expected result:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?entity WHERE {
     values ?search { "inventor"@en } .
     ?entity @en@skos:altLabel ?search
}

However, the following query (remove the 'r' in 'inventor')

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?entity WHERE {
     values ?search { "invento"@en } .
     ?entity @en@skos:altLabel ?search
}

yields the following error:

Unknown error
Exception: BAD INPUT STRING (The word "invento"@enis not part of the vocabulary.; in /app/src/engine/Values.cpp, line 147, function static void Values::writeValues(IdTable*, const Index&, const SparqlValues&) [with long unsigned int I = 1; IdTable = IdTableStatic<>])

I was expecting an empty result set and find it strange to see an error instead.

@niklas88
Copy link
Member

@graue70 agree that doesn't look like the expected behaviour to me either (even without looking at the spec). @floriankramer?

@graue70
Copy link
Contributor Author

graue70 commented Jan 10, 2020

To further make my point: The following query yields the expected empty result set with no error:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?entity WHERE {
     ?entity @en@skos:altLabel "invento"@en
}

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