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

Integers have no schema information and are returned (and shown) as floats #341

Closed
graue70 opened this issue May 19, 2020 · 2 comments
Closed

Comments

@graue70
Copy link
Contributor

graue70 commented May 19, 2020

Example query:

PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?astronaut_name ?sitelinks WHERE {
  ?astronaut wdt:P106 wd:Q11631 .
  ?astronaut rdfs:label ?astronaut_name .
  ?astronaut_node schema:about ?astronaut .
  ?astronaut_node wikibase:sitelinks ?sitelinks .
  FILTER (LANG(?astronaut_name) = "en")
}
ORDER BY DESC(?sitelinks)

The second result column used to contain values like '"3"^^<http://www.w3.org/2001/XMLSchema#int>' which was shown in the UI simply as 3.
Now, the values look like '3.000000' and are shown just like that, with six decimal zeros.

This seems like a bug to me. I can't find the commit where it was introduced, though, so I can't be sure it's not a feature.
Or was this changed in wikidata directly?

@graue70
Copy link
Contributor Author

graue70 commented Aug 31, 2020

qlever recently (during the last week) switched to a new (third) behavior for integers, which is '3.0^^<http://www.w3.org/2001/XMLSchema#decimal>'.
Can anybody please comment on which is the expected result format? Why is the format changing so often?

@graue70
Copy link
Contributor Author

graue70 commented May 6, 2021

The format went back to the original '"3"^^<http://www.w3.org/2001/XMLSchema#int>' at some point. I hope this is covered by some unit tests now.

@graue70 graue70 closed this as completed May 6, 2021
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

1 participant